1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

converting string to time

Discussion in 'C' started by answerme, Apr 27, 2010.

  1. answerme

    answerme New Member

    Joined:
    Dec 17, 2007
    Messages:
    114
    Likes Received:
    0
    Trophy Points:
    0
    have a string "072455.00" this represents UTC time
    How should i convert this particular string to time
     
  2. davidk

    davidk New Member

    Joined:
    Mar 25, 2010
    Messages:
    16
    Likes Received:
    1
    Trophy Points:
    0
    Home Page:
    I guess it means 07:24:55.

    To convert your string into time:
    1. take by 2 characters from the string: hours, minutes and seconds
    2. convert them into numbers
    3. use 'struct tm' and 'mktime()' of time.h header
     

Share This Page