Skip to content
Advertisement

Convert date object in normal format

When I am using a Python object, I get:

JavaScript

This is not the format I need. We need to convert to this data format:

JavaScript

How can I convert this in Python/Django?

Example:

JavaScript

It’s working fine, but how can I pass 2018-05-18 10:05:06 as database but database giving?

JavaScript
JavaScript

It’s giving 2018-05-18 08:38:58+00:00.

How can I check date as per 2018-05-18 08:38:58?

Advertisement

Answer

Now I have implemented code for Python changes. Now it’s working. We need to just change the time setting.

Get any date from the database and change as required.

JavaScript

Implement any other functionality as per changes.

Advertisement