Hi ,

import datetime
now = datetime.datetime.now()

#You probably need something like below --
date = now.strftime("%d %b %Y")

Some more cool and excellent Date manipulation and display tactics
at:
http://www.saltycrane.com/blog/2008/06/how-to-get-current-date-and-time-in/


Regards, Rahul D (www.flockbird.com)


On Feb 13, 12:49 pm, Manuele Pesenti <[email protected]>
wrote:
> Il 13/02/2012 08:40, Sanjeet Kumar ha scritto:> Hi to all,
>
> > I want to change the date format during the insertion in database
> > default is YYY-MM-DD but i want to insert in database by using the DD-
> > MM-YYYY and Month should be in the 'jan' format .
>
> > Please help me
>
> have a look here
>
> http://web2py.com/books/default/chapter/29/7
>
> and here
>
> http://docs.python.org/library/datetime.html#strftime-and-strptime-be...
>
> :)
>
>      M.

Reply via email to