You can translate the question and the replies:

18 digit timestamp LDAP timestamp conversion

I have a timestamp field in the following 18 digit format from our LDAP 132332110839739771 Is there any easy way to convert this to a standard date format? based on converter online this is the value: Epoch/Unix time: 1588737483 GMT: Wednesday, May 6, 2020 3:58:03 AM Your time zone: Tuesday, May 5, 2020 11:58:03 PM GMT-04:00
user
03-03-2021 15:09:42 -0500
code

1 Answer

Hi, It is possible to convert a datetime value into the timestamp with time zone format using the** to_timestampz** function. The syntax is, `TO_TIMESTAMPTZ( <timestamptz pattern:text>, <value:text> [, <language:text> ] ):timestamptz` where **timestamptz pattern** is required in a pattern describing the date and time format of value, following the syntax defined by Java in the class java.text.SimpleDataFormat. You can also use the [Date time processing functions](https://community.denodo.com/docs/html/browse/8.0/en/vdp/vql/appendix/syntax_of_condition_functions/date_processing_functions#to-timestamptz) of the Virtual DataPort to achieve your use case. You can also convert/ cast the value to an EPOC value and the convert it to timestamp format in the Virtual DataPort. Please refer to this related [Community question](https://community.denodo.com/answers/question/details?questionId=9060g000000TQzqAAG&title=Converting+timestampz+to+epoch+time). Hope this helps!
Denodo Team
05-03-2021 07:08:17 -0500
code
You must sign in to add an answer. If you do not have an account, you can register here