Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
vinay_bangari
Specialist III
Specialist III

converting a PTP (Precision Time Protocol) string into a date and time?

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

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

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

View solution in original post

7 Replies
Anil_Babu_Samineni

What date format it should be for 1504720821967??

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Miguel_Angel_Baeyens

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

vinay_bangari
Specialist III
Specialist III
Author

i want in the following format : 'MM/DD/YYYY '

vinay_bangari
Specialist III
Specialist III
Author

let me try this

Miguel_Angel_Baeyens

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

View solution in original post

Anil_Babu_Samineni

That is okay, Please provide output you want to see for that date row if you aware the result

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
vinay_bangari
Specialist III
Specialist III
Author

Thanks a lot saver of the day