You Are Here:

Community: Developer Discussion Boards

#1 Old current date? today's date? - 2008-10-27, 16:45

Join Date: Oct 2008
Posts: 29
mango7
Offline
Registered User
Hi,

Does anyone know how to retrieve the current day/ today's date in python? I am would like to set the default expiration date in my form to today's date (or several days from now).

Thanks in advance.
Reply With Quote

#2 Old Re: current date? today's date? - 2008-10-27, 16:51

Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
bogdan.galiceanu's Avatar
bogdan.galiceanu
Offline
Forum Nokia Champion
You could use the functions in the time module to manipulate times and dates.
A simple example for retrieving the current date and time:
Code:
>>> import time
>>> print time.localtime()
(2008, 10, 27, 17, 49, 58, 0, 301, 0)
#The current date is the first three elements in the tuple
Reply With Quote

#3 Old Re: current date? today's date? - 2008-10-27, 18:52

Join Date: Feb 2008
Posts: 743
Location: Belo Horizonte, Brazil
Send a message via Skype™ to Rafael T.
Rafael T.'s Avatar
Rafael T.
Offline
Forum Nokia Champion
Quote:
Originally Posted by mango7 View Post
Hi,

Does anyone know how to retrieve the current day/ today's date in python? I am would like to set the default expiration date in my form to today's date (or several days from now).

Thanks in advance.

You may also want to see this article.


Hope it helps,

Rafael.
Reply With Quote

#4 Old Re: current date? today's date? - 2008-10-30, 07:45

Join Date: Oct 2008
Posts: 29
mango7
Offline
Registered User
Thanks, I got it!
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot create sis package? gomcoite Themes/Carbide.ui 4 2008-09-27 18:54
Error in packaging process :( a-eqla3 Themes/Carbide.ui 2 2008-07-30 23:03
Error in packaging process :( a-eqla3 Carbide.c++ IDE and plug-ins 1 2008-07-24 21:33
Getting current date and time Deepa msc Mobile Java General 6 2008-06-25 11:08
ERROR IN CREATING THEME ssmantri Themes/Carbide.ui 5 2008-05-29 21:58

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia