1. Daniel Vivier
  2. PowerBuilder
  3. Wednesday, 12 February 2020 20:55 PM UTC

The Help on Time Display Formats says you can use the format [Time] to specify the format specified in the Windows control panel.

However, in my Region settings in Windows 10 Control Panel, the Short Time is "3:52 PM", and the Long Time is "3:52:13 PM".

But if I display String(Now(), "[Time]") in a messagebox, I see "15:53:29" (obviously a minute later or so). Same thing happens if I first assign Now() to a Time variable, or DateTime(Today(), Now()) to a DateTime variable and evaluate them with the same format. So that's just what the PB Help says is the default format, 24-hour, if no format is used.

Am I misunderstanding something? Or is it a bug?

Accepted Answer
Daniel Vivier Accepted Answer Pending Moderation
  1. Monday, 17 February 2020 22:10 PM UTC
  2. PowerBuilder
  3. # Permalink

Appeon has accepted this as a bug and confirms it is a legacy issue from PB 12.6, that they will investigate and presumably fix.

Comment
  1. Armeen Mazda @Appeon
  2. Monday, 17 February 2020 23:16 PM UTC
Thanks for sharing the status as the accepted answer!
  1. Helpful
  1. Michael Kramer
  2. Tuesday, 18 February 2020 00:37 AM UTC
Thx for sharing
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 12 February 2020 21:12 PM UTC
  2. PowerBuilder
  3. # 1

Hi Dan;

   That is why we have

1) String ( lt_time, "HH:MM AM/PM")

2) DW Column Display & Edit Masks

  To ensure consistent time display on international PB Apps.

Regards ... Chris

Comment
  1. Roland Smith
  2. Wednesday, 12 February 2020 21:37 PM UTC
Many countries do not use AM/PM. The generic date & time formats are supposed to format using the value in the Control Panel.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Wednesday, 12 February 2020 21:41 PM UTC
FWIW: I do not know about your App requirements but, I normally do it by language. That is because I get Spanish, German, French etc people using English windows. So I standardized my Apps along those language / country lines vs letting the App users choose any regional setting(s) at random. Just my $0.02

Hmmm... if [DATE] or [TIME] format is not being observed by the PB DWO's run-time, then that would be a "bug". Please open a support ticket if so.

FWIW: For String() commands, I read the formatting from the App's INI file and apply it thus ..

String ( lt_time, ls_time_format )

  1. Helpful
  1. Daniel Vivier
  2. Wednesday, 12 February 2020 22:20 PM UTC
OK, I'm going to open a bug report.
  1. Helpful
There are no comments made yet.
Michael Kramer Accepted Answer Pending Moderation
  1. Wednesday, 12 February 2020 23:25 PM UTC
  2. PowerBuilder
  3. # 2

Hi Dan, 

Agree, open a support ticket for [Time].

I just checked on my machine:

  • Windows Version ==> 10.0.19041.21
  • [LongDate] ==> Format = <sLongDate> in regional settings
  • [ShortDate] ==> Format = <sShortDate> in regional settings
  • [Time] ==> Format = HH<sTime>mm<sTime>ss in regional settings (typically HH:mm:ss)

So I see exactly like you.
I had RegEdit open and edited regional setup directly to see immediate effect as soon as I navigated to another column or retrieved data.

Date values changed display value immediately.

Time value changed display value immediately - when I edited value for Name = <sTime>.
No changes no matter what I entered for <sShortTime> or <sTimeFormat>.
Also, I created <sLongTime> without seeing any effect.

/Michael

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.