Skip to main content
Solved

How to fix LastModifiedDateTime in the database?

  • 11 July 2024
  • 2 replies
  • 27 views

We have LastModifiedDateTime in the database tables in the future. On the application level it’s correct.

Application Time

 

 

Database field time

 

Database collation is SQL_Latin1_General_CP1_CI_AS. Our location -  US, Central Time

2 replies

Userlevel 4
Badge +1

The datetime in the database is typically stored as UTC. There’s a lot of logic taking place depending on timezone setup on the user, tenant, etc. that converts to/from UTC time to local time zone visible on the screen.

Userlevel 2

Found the solution:

SELECT LastModifiedDateTime  AT TIME ZONE 'UTC' AT TIME ZONE 'Central Standard Time' from SOLIne 

 

Thanks mbridges00 for your help!

Reply