Home » Developer & Programmer » Forms » Text Item (Time Problem - AM/PM ) (Forms 6i, XP)
Text Item (Time Problem - AM/PM ) [message #406470] Thu, 04 June 2009 03:05 Go to next message
theEnemy
Messages: 3
Registered: June 2009
Junior Member
Hey guys,

Can someone please help me to make this text item set only for PM time ?

When I enter a time (i.e 01:00) it automatically sets to AM.(Should be PM).

The format mask of the text item is : HH:MIPM

The client doesn't want to manually type the AM/PM.

But the text item on the Time Out 1 automatically detects the time to AM or PM.

It's format mask is : HH:MIAM

I've tried changing the format mask of Time In 2, but still the same.

All help is appreciated.

Thanks! Cool
  • Attachment: 1.jpg
    (Size: 71.40KB, Downloaded 555 times)

[Updated on: Thu, 04 June 2009 03:44]

Report message to a moderator

Re: Text Item (Time Problem - AM/PM ) [message #406615 is a reply to message #406470] Fri, 05 June 2009 00:01 Go to previous messageGo to next message
theEnemy
Messages: 3
Registered: June 2009
Junior Member
guys please let me know if something is un-clear on my post.

This little issue is bugging me Sad
Re: Text Item (Time Problem - AM/PM ) [message #406633 is a reply to message #406615] Fri, 05 June 2009 01:47 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Well, you might try the following:
  • TIME_IN_2 should be a DATETIME item, its format set to "hh:miPM"
  • write a WHEN-VALIDATE-ITEM on this item as
    :time_in_2 := :time_in_2 + 12/24;
    to force it to accept all values as "PM" (i.e. add 12 hours to a value entered by user)
Perhaps there is another (and better) way to do that, but ... hm, can't think of any at the moment.
Re: Text Item (Time Problem - AM/PM ) [message #406640 is a reply to message #406470] Fri, 05 June 2009 02:44 Go to previous message
theEnemy
Messages: 3
Registered: June 2009
Junior Member
Hey man thanks for the help, it worked.

There's a little prob. though, but I think I can fix it.

thanks again. Laughing
Previous Topic: custom form FRM-92100
Next Topic: rtf in forms
Goto Forum:
  


Current Time: Sun Feb 09 12:14:19 CST 2025