Convert timestamp to see seconds | Community
Skip to main content
Level 2
April 19, 2024
Solved

Convert timestamp to see seconds

  • April 19, 2024
  • 1 reply
  • 1658 views

When using the QueryService in AEP, I realized that the timestamp is only showing datetime format as "05/08/2023, 3:10 PM".

What would be the correct SQL to make the results show the seconds as well? ("05/08/2023, 3:10:54 PM") 

Best answer by Kumar29917170hcyp

Hi @kktt-1,

 

Use the below query to get the complete timestamp in the Query Services UI:

select cast(column_name as string) from table_name;

 

Hope this helps!

 

Regards,

Kumar Saurabh

1 reply

Adobe Employee
April 20, 2024

Hi @kktt-1,

Use the Command Line Interface to get the exact view of the data ingested in datalake.

https://experienceleague.adobe.com/en/docs/experience-platform/query/clients/psql

 

Regards,

Kumar Saurabh

 

kktt-1Author
Level 2
April 22, 2024

Hi @kumar29917170hcyp - our company doesn't allow psql on our machines. Is there a sql query that I can use to directly convert the outputs in the query service UI? 

Thanks!

Kumar29917170hcypAdobe EmployeeAccepted solution
Adobe Employee
April 23, 2024

Hi @kktt-1,

 

Use the below query to get the complete timestamp in the Query Services UI:

select cast(column_name as string) from table_name;

 

Hope this helps!

 

Regards,

Kumar Saurabh