How to get unix timestamp from formatted date?
Hello!
I am using Twitter API and it returns the date in this format:
Wed Jul 08 10:38:06 +0000 2009
I need to store the date as unix timestamp. How can I convert this formatted date to a unix timestamp?
Is there a class in Java that can do this?
Thanks.
Re: How to get unix timestamp from formatted date?
Hello snytkine,
I've been reading up on this - Unix time - Wikipedia, the free encyclopedia
Which part of the above date String do you need to generate the time stamp? It's the Month, Day, Year & Time right? We can forget the Wed and +0000?
Re: How to get unix timestamp from formatted date?
Sure, we can forget about Wed and I am not sure about +0000, it's probably GMC offset, we should not forget about GMC offset.
Re: How to get unix timestamp from formatted date?
Quote:
Originally Posted by
snytkine
Sure, we can forget about Wed and I am not sure about +0000, it's probably GMC offset, we should not forget about GMC offset.
Do you mean GMT offset?
I'm looking into this now...
Re: How to get unix timestamp from formatted date?
Re: How to get unix timestamp from formatted date?
Have you started writing any code yet?
These links should help:
4WebHelp - Online Tools: Unix Timestamp Converter
Epoch Converter - Unix Timestamp Converter
I'm playing with it and i'll post back soon