fbpx
Welcome, Guest
Username: Password: Remember me
Visual Objects

Please use this forum to post questions about Visual Objects and Vulcan.NET
  • Page:
  • 1

TOPIC: bBrowser time field display

bBrowser time field display 6 days 16 hours ago #11650

  BiggyRat's Avatar Topic Author BiggyRat Offline Posts: 228
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?

Attachments:

Please Log in or Create an account to join the conversation.

bBrowser time field display 6 days 11 hours ago #11651

  Jamal's Avatar Jamal Offline Posts: 172
You need to provide an expression codeblock when you add your bDataColumn:

For example:
oColumn := bDataColumn{SELF:oDCbBrowser1, SELF:oDCbBrowser1:Server,;
		{|oServer, oSelf| , MyFormatTime(oServer:FIELDGET(#JOBTIME)) )}, #Expression, self}

Create a MyFormatTime(sTime as String) function to return the value format you want.

Jamal

Please Log in or Create an account to join the conversation.

Last edit: by Jamal.

bBrowser time field display 5 days 17 hours ago #11652

  BiggyRat's Avatar Topic Author BiggyRat Offline Posts: 228
Thanks so much Jamal.

Please Log in or Create an account to join the conversation.

bBrowser time field display 5 days 4 hours ago #11661

  robert's Avatar robert Offline Posts: 1309
Jeff
SetAmPm(false)
SetPMExt(" pm")
SetAMExt(" am")

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
XSharp Development Team
The Netherlands

Please Log in or Create an account to join the conversation.

bBrowser time field display 5 days 4 hours ago #11665

  BiggyRat's Avatar Topic Author BiggyRat Offline Posts: 228
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?

Please Log in or Create an account to join the conversation.

Last edit: by BiggyRat.

bBrowser time field display 5 days 1 hour ago #11669

  Karl-Heinz's Avatar Karl-Heinz Offline Posts: 390
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

Please Log in or Create an account to join the conversation.

  • Page:
  • 1