Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Does anyone have experience converting a PTP (Precision Time Protocol) string into a date and time? Here are a few examples of the values that are coming in from the data source.
1504720821967
1504720822401
1504720875154
1504720875420
1504720880194
1504720880195
1504720896241
1504720896519
1504720896520
1504720905016
1504720905283
1504721314762
1504721314775
Then specify it even if the script, if you want (applications will be heavier):
Date(Date#('01.01.1970', 'DD.MM.YYYY') + PTPTimestampField/86400/1000, 'MM/DD/YYYY hh:mm:ss.fff') AS Timestamp
What date format it should be for 1504720821967??
Something like this should work, but you will need to tweak the divisor depending on the precision of those timestamps (I'm assuming 1000, could be higher):
Date(Date#('01.01.1970', 'DD.MM.YYYY') + PTPTimestampField/86400/1000) AS Timestamp
EDIT: divisor separated for clarity
i want in the following format : 'MM/DD/YYYY '
let me try this
Then specify it even if the script, if you want (applications will be heavier):
Date(Date#('01.01.1970', 'DD.MM.YYYY') + PTPTimestampField/86400/1000, 'MM/DD/YYYY hh:mm:ss.fff') AS Timestamp
That is okay, Please provide output you want to see for that date row if you aware the result
Thanks a lot saver of the day