unix time to normal time

Answered Question
Oct 30th, 2009
User Badges:


Hi all,


We have done the data migration of DFM fault History from the database to Crsytal Report 2008. The data migration is also including a column of date and time. Migration process completed and we noticed on crystal report, the date and time format has changed into 13 digits of unix time format (eg: 1254538573296).


In order to change it to the normal date and time format (eg: mm/dd/yyy 12:34:56 am), we do add a few syntax to the crystal report and we manage to change it. however the problem is, the date and time was appeared wrongly. we

have tried using online converter and after few times we noticed that,if only 10 digits from the unix time is entered, the date and time may appear correctly. Whereas we have 13 digits of unix time that we obtained from the data migration.


Is there any way that we can fix this so that there will only take 10 digits from the database instead of 13 digits?



Correct Answer by Joe Clarke about 7 years 7 months ago

The 13 digits are seen because DFM is written in Java, and Java stores an extra three digits for milliseconds since January 1, 1970.  There is no way to export a 10 digit epoch time from DFM.  Your post-processing script will need to strip off the trailing three digits to create an epoch time which only includes seconds.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Correct Answer
Joe Clarke Sun, 11/22/2009 - 15:59
User Badges:
  • Cisco Employee,
  • Hall of Fame,

    Founding Member

The 13 digits are seen because DFM is written in Java, and Java stores an extra three digits for milliseconds since January 1, 1970.  There is no way to export a 10 digit epoch time from DFM.  Your post-processing script will need to strip off the trailing three digits to create an epoch time which only includes seconds.

Actions

This Discussion