Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
190
Column: Date Time to convert to LocalTime
posted

Hello! I must to say that this forum is very helpfull.

 

I have some columns with DateTime that are retrieved from DB in UTC.

Threre is some options to show them in grid in local tome? I found only way to format the date...

 

Thanks a lot!

 

Parents
No Data
Reply
  • 45049
    Verified Answer
    posted

    WinGrid has no built-in functionality to handle date conversion.  If your underlying data contains time expressed in UTC, then the grid will show it in UTC.

    There are two options.  One is to translate the data to local time in your underlying data source (and, of course, to translate it back before storing these DateTime values back to the database).  The other is to use a DataFilter on the grid to perform the translation each time the data is requested and updated.  I suggest the first option; it's less code to write, and will only affect performance when interacting between your data source and the database.

Children