how to convert windows date and time to unix date and time
hi friends i am a .net developer and i want to convert windows date and time to windows date and time can anybody help me out please its urgent..
|
What form does the Windows date take? mmddyyyhhmmss - or something of the like; as I highly doubt it references from the epoch (Jan 1, 1970).
Here's the Wikipedia article on UNIX time. Get on them regexes. :) EDIT: I just re-read your post - going from Windows D&T to Windows D&T sure sounds like a daunting task; I wish you the best of luck with it. ;) *heheh* I assumed you meant Windows D&T to POSIX D&T. |
how to convert data and time to unix date and time
hey indienick i now how to convert the current date and time to unix timestamp i am doing this with C#.net and now i want to convert the dates which are given to me in a file .like this
start_date_time,ani,dialed_digits,actual_dur,rounded_dur_secs,cost 3/18/2008 0:00,22575444,92685702995,1411,1411,1.9275 3/18/2008 0:00,13127337788,524659671385,43,60,0.0675 3/18/2008 0:00,17133415611,524281857171,454,480,0.54 3/18/2008 0:00,--------------,523595243087,28,60,0.0675 now i need to read date and time in this format and convert it into linux time stamp so can you plz help me... |
i have no answer for that.. but u can find 1 on yahoo answer..
cheers |
While I can't provide a language-specific answer (as I don't know C#), I can give you a general algorithm to follow (besides, where's the fun in it if I just give you the answer? :)):
Code:
1. Initialize a counting variable. |
how to convert windows date and time to unix date and time
Quote:
well thanks for all your help i have developed the code in C#. and its working fine now but i really appreciated your help. thanks alot. |
hey fine teen thanks for your participation. I have developed the code and its working fine. but be sure to help me next time. thank you.
|
I’m wondering how you did it (there must be an easier way than manually). Is there any equivalent of strptime() in C#?
|
.
Sorry.I don't know!
|
All times are GMT -5. The time now is 08:29 AM. |