Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Convert from millisecond to DateTime format
BIRTigo
Hi,
In our DB we have a column for DateTime which is in millisecond format, e.g. the input has 1088499889000 that corresponds to the date 2004-06-29 09:04:49.000GMT.
The user has to input a start and end DateTime. Is there a way to convert DateTime to millisecond and vice versa?
Please help.
Find more posts tagged with
Comments
Asmrani
Hello
,<br />
<br />
This will help you as it helped me when I ran into the same issue<br />
<br />
<br />
<a class='bbc_url' href='
http://www.epochconverter.com/'>http://www.epochconverter.com/</a><br
/>
<br />
<br />
Hence Epoch time is the amount of seconds since Jan 1st, 1970.<br />
<br />
<br />
So you have them in ms -- No problem; Just divide by a thousand -- although you will lose a very very small ms time
Asmrani
So if the db is sql server use this
DATEADD(s, epoch, '19700101')
and if it's MYSQL, use this:
from_unixtime(epoch, optional output format)