×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jun 2007
    Location
    Berlin
    Posts
    2

    Convert Date to timestamp?

    How can I convert a date into a timestamp? I've tried this, but on time.mktime() python crashes:


    Code:
    from datetime import datetime
    import time
    firstOfMonth = datetime(2009, 10, 1, 0, 0)
    firstOfMonthTs = time.mktime(firstOfMonth.timetuple())

  2. #2
    Nokia Developer Champion
    Join Date
    Jul 2008
    Location
    Pakistan
    Posts
    1,065

    Smile Re: Convert Date to timestamp?

    It is a known bug in Pys60 1.9.7 ,Take a look here:
    time.mktime() crashes interpreter
    So, wait till the next release fix this bug or just try pys60 1.9.6 as this fucntion works fine in it.

    Best Regards,
    SajiSoft

  3. #3
    Registered User
    Join Date
    Jun 2007
    Location
    Berlin
    Posts
    2

    Re: Convert Date to timestamp?

    Too bad. Thanks for the link.

Similar Threads

  1. to convert TBuf to date format and TInt.
    By suryadas in forum Symbian
    Replies: 2
    Last Post: 2009-07-16, 05:43
  2. Convert String to Date
    By bapithanc in forum Mobile Java General
    Replies: 6
    Last Post: 2008-08-13, 05:50
  3. How can i convert date to previous date?
    By s_mehdi76 in forum Symbian
    Replies: 4
    Last Post: 2008-06-27, 10:57
  4. convert date value into string and vice versa
    By mobile_don in forum Mobile Java General
    Replies: 1
    Last Post: 2007-05-10, 12:07
  5. convert Date object to string
    By artemg in forum Mobile Java General
    Replies: 4
    Last Post: 2006-03-03, 04:56

Posting Permissions

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