×

Discussion Board

Results 1 to 3 of 3

Thread: Date

  1. #1
    Regular Contributor
    Join Date
    Mar 2008
    Posts
    57

    Date

    How can I get current year and month?

  2. #2
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: Date

    One solution would be using the "time" module:
    Code:
    import time
    
    time.localtime()
    #Returns a tuple such as (2008, 4, 24, 6, 22, 9, 3, 115, 1)
    
    #So in your case, just use localtime()[0] and localtime()[1]

  3. #3
    Regular Contributor
    Join Date
    Dec 2007
    Location
    India
    Posts
    133

    Smile Re: Date

    Quote Originally Posted by DrivingMobileInnovation View Post
    How can I get current year and month?
    Quote Originally Posted by bogdan.galiceanu View Post
    One solution would be using the "time" module:
    Code:
    import time
    
    time.localtime()
    #Returns a tuple such as (2008, 4, 24, 6, 22, 9, 3, 115, 1)
    
    #So in your case, just use localtime()[0] and localtime()[1]
    Right, I also added this and some other methods for getting date and time using Python on the wiki.
    http://wiki.forum.nokia.com/index.ph..._date_and_time
    Kandyfloss

    V 7.0642.0
    18-10-06
    RH-51
    Nokia 7610

Similar Threads

  1. Get the date as String from j2me form
    By bvsbh in forum Mobile Java General
    Replies: 5
    Last Post: 2012-05-05, 18:44
  2. Date & Time Editor in Form Resource.
    By Kavit Patel in forum Symbian
    Replies: 2
    Last Post: 2008-03-03, 06:26
  3. Issue with slow date operations on N95
    By redsmurph in forum Mobile Java General
    Replies: 8
    Last Post: 2007-12-24, 17:15
  4. preverify error. PLZ HELP
    By michaelhann89 in forum Mobile Java Tools & SDKs
    Replies: 14
    Last Post: 2007-03-22, 22:51
  5. Date format...!!!
    By palak_shah_23 in forum Symbian
    Replies: 4
    Last Post: 2006-09-07, 07:27

Posting Permissions

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