[web] time recognition from raw time-data javascript

Started by
1 comment, last by RSC_x 16 years, 3 months ago
hi . this is part of my database which is raw and i hawe to recive a time parameter from this. it works on &#106avascript. but probally i'll need a c/c++ version too. so can anyone help me to read a valid time from this . <!--STARTSCRIPT--><!--source lang="cpp"--><div class="source"><pre> data=<span class="cpp-literal">"^n51710 jan mon13:25:501.bcdef 49067,71 17,29 10/09/2007 "</span> </pre></div><!--ENDSCRIPT--> 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.
© Loading... !!!
Please Wait...!
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.
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.
© Loading... !!!
Please Wait...!

This topic is closed to new replies.

Advertisement