Sign in to follow this  

[web] time recognition from raw time-data javascript

This topic is 3631 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
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

This topic is 3631 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this