You Are Here:

Community: Developer Discussion Boards

#1 Old Lightbulb Unix format of time - 2008-11-01, 22:45

Join Date: Oct 2008
Posts: 5
mozillaman
Offline
Registered User
Hi

I dont know how should I convert date format (like 2008-11-1 12:35:02) to unix format (I need it in calendar db)

is any converting function between Human format <==> Unix format ?

thank you
Reply With Quote

#2 Old Re: Unix format of time - 2008-11-01, 23:14

Join Date: Dec 2007
Posts: 409
Location: Tempe, AZ
Send a message via Yahoo to shubhendra Send a message via Skype™ to shubhendra
shubhendra's Avatar
shubhendra
Offline
Forum Nokia Champion
A simple search would have done the job,
http://www.epochconverter.com/


IDEAS is all they need but still they think only Genius can give them that.
Reply With Quote

#3 Old thanks - 2008-11-01, 23:18

Join Date: Oct 2008
Posts: 5
mozillaman
Offline
Registered User
thank you, but

Quote:
import time
int(time.mktime(time.strptime('2000-01-01 12:34:00', '%Y-%m-%d %H:%M:%S')))
Says: File "<console>", line 1, in ?
AttributeError: 'module' object has no attribute 'strptime'

is the problem with my Python installation or is it general problem?
Last edited by mozillaman : 2008-11-01 at 23:24.
Reply With Quote

#4 Old Re: Unix format of time - 2008-11-02, 01:56

Join Date: Sep 2007
Posts: 395
Location: Bhavnagar
Send a message via Yahoo to james1980
james1980's Avatar
james1980
Offline
Forum Nokia Champion
Hi,
I think time module not have the function strptime but its a strftime.
Thts why it gives you an error.
Regards.


Jajal Mehul
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
Problem in Time aamitgupta General Symbian C++ 7 2007-12-21 17:18
Recording audio in AMR format, SDK 3rd handle_cn General Symbian C++ 12 2007-11-03 09:16
How 2 chk TTime object contains date & time in correct format sameer.chaudhari General Symbian C++ 6 2007-09-28 06:36
Bizarre calendar/time zone change handling in Nokia 9500 noetus General Discussion 0 2005-09-19 20:27
????????Convert Date format mehulgarnara Mobile Java Tools & SDKs 0 2005-04-15 08:34

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