1. Ganesan Rajan
  2. PowerBuilder
  3. Friday, 14 June 2024 09:00 AM UTC

Hi,

I have a query related to Datetime format in DWs. i,e does DW automatically convert datetime value to local time zone?

We have a datawindow displaying Order Date. Column style type is Edit and Format is dd/mm/yyyy hh:mm.

The Datasource is an SP (MS Sql Server) and the database column datatype is Datetimeoffset which stores time zone too. Data for the order date looks like this 2023-11-16 14:47:39.322 +05:30. The SP just outputs the data as it is in Database.
This data was created in India.

My question is that when we open this record in a desktop from some other region(Ex: Singapore), does the PowerBuilder DW do any automatic conversion show the datetime in local time?

Thanks in Advance,

Ganesan R

Ganesan Rajan Accepted Answer Pending Moderation
  1. Wednesday, 26 June 2024 11:01 AM UTC
  2. PowerBuilder
  3. # 1

Thank you. I will try this option

Comment
There are no comments made yet.
Ganesan Rajan Accepted Answer Pending Moderation
  1. Wednesday, 26 June 2024 10:59 AM UTC
  2. PowerBuilder
  3. # 2

Thank you John

Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Friday, 14 June 2024 14:23 PM UTC
  2. PowerBuilder
  3. # 3

Hi, Ganesan -

PB does not support the SQL Server datetimeoffset datatype:

https://docs.appeon.com/pb2022/connecting_to_your_database/XREF_54630_SQL_Server_2008.html#XREF_42939_Support_for_new

Also, I am not aware of any features or facilities within PB that provide automatic conversion of time/datetime values to different time zones. I believe there are some Windows API functions that can do that, but the data format for datetime values in PB are different than what is used by Windows.

Best regards, John

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Friday, 14 June 2024 09:51 AM UTC
  2. PowerBuilder
  3. # 4

Instead of using fixed format "dd/mm/yyyy hh:mm", use "[shortdate]" or [shortdate] hh:mm. That should use the settings as configured by the user in his windows' settings.

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.