Skip to content Skip to sidebar Skip to footer

Save Date In Django In Desired Format

I want to save date in my django model into desired format. post_date = str(request.POST['date']) I am getting date from front end is 12/21/2016 i want to save this date in my dja

Solution 1:

you want to store in DB string parameter? The easiest way convert input string to date and then convert from date to string. But of course it is more logical to store date format imho


Post a Comment for "Save Date In Django In Desired Format"