Jump to content
  • Advertisement
Sign in to follow this  
RSC_x

[web] time recognition from raw time-data javascript

This topic is 3878 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi . this is part of my database which is raw and i hawe to recive a time parameter from this. it works on javascript. but probally i'll need a c/c++ version too. so can anyone help me to read a valid time from this .
data="^n51710 jan mon13:25:501.bcdef 49067,71    17,29  10/09/2007                         "

later i vas using data.split(" ") but its dynamic and sometimes its structure is chancing. eg.. year parameter missing etc.. yes its easy but i think i working with this more then 3+ moonths and i think i need help. "13:25:50"=time "10/09/2007"=date so is there any good way to get this above two data if they are valid and check if they are not valid [eg time is missing ] thanks.

Share this post


Link to post
Share on other sites
Advertisement
Why on earth are you storing it like that? I would use Unix Time to store your time/date instead and parse the date according to the desired format (various language libraries should have support for this).

I hope this is relevant/helpful, as i just found it odd you would be storing that data in a useless form.

Share this post


Link to post
Share on other sites
Quote:
Original post by Karan Bhangui
Why on earth are you storing it like that? I would use Unix Time to store your time/date instead and parse the date according to the desired format (various language libraries should have support for this).

I hope this is relevant/helpful, as i just found it odd you would be storing that data in a useless form.


hey this not my choice its something like a channel which serving that information.
and i need to check this information because this line is just one which hawe info about time.
so after that i'll hawe ability to know the time of server.
i'm trying to convert this binary/raw time to standard time.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!