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:
    http://www.firmdev.com/firm_framework
    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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice