Hi. I'm trying to set the time format to hh:mm tt in a time column within a bbrowser using such methods as:
SetAmPm(false)
SetPMExt(" pm")
SetAMExt(" am")
in the postinit method of the screen on which the bbrowser appears, but nothing makes any difference. How do I get the desired result as shown in the attached screenshot below please?
bBrowser time field display
bBrowser time field display
You need to provide an expression codeblock when you add your bDataColumn:
For example:
Create a MyFormatTime(sTime as String) function to return the value format you want.
Jamal
For example:
Code: Select all
oColumn := bDataColumn{SELF:oDCbBrowser1, SELF:oDCbBrowser1:Server,;
{|oServer, oSelf| , MyFormatTime(oServer:FIELDGET(#JOBTIME)) )}, #Expression, self}
Jamal
bBrowser time field display
Jeff
This changes global state. You should not do this in an app where more than one window or task can be running at the same time.
Robert
Code: Select all
SetAmPm(false)
SetPMExt(" pm")
SetAMExt(" am")
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
bBrowser time field display
Ok. Thanks Robert. It was just used to test the workings of it.
On an unrelated (not in this screen) but related ( in just 2 other screens) I need to specifically put SetDateFormat("dd/MM/yyyy") to make dates appear in the right format in browsers, despite having it in my Start method.. I know 100% that at no point do I manually change date formats, as I have absolutely no reason to, or want to... connected maybe?
On an unrelated (not in this screen) but related ( in just 2 other screens) I need to specifically put SetDateFormat("dd/MM/yyyy") to make dates appear in the right format in browsers, despite having it in my Start method.. I know 100% that at no point do I manually change date formats, as I have absolutely no reason to, or want to... connected maybe?
-
- Posts: 774
- Joined: Wed May 17, 2017 8:50 am
- Location: Germany
bBrowser time field display
Hi Jeff,
SetAmPm(false) <-- is this just a typo, or are you really using SetAmPm(false) instead of SetAmPm(TRUE) ?
SetPMExt(" pm")
SetAMExt(" am")
In which format is a time stored in your server field ? what does a simple oServer:fieldget ( <yourTimeField> ) show ?
regards
Karl-Heinz
SetAmPm(false) <-- is this just a typo, or are you really using SetAmPm(false) instead of SetAmPm(TRUE) ?
SetPMExt(" pm")
SetAMExt(" am")
In which format is a time stored in your server field ? what does a simple oServer:fieldget ( <yourTimeField> ) show ?
regards
Karl-Heinz