Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 8256 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

The following calc does not handle the 12th hour well. The user is selecting time from radio buttons. (hours, minutes, am/pm)

Time(_Hour+(12*If(_AmPm="PM",1,0)), _Min, "00")

can anyone solve this nice and clean

Posted

Dunno about "nice and clean", but if you'll settle for "works" then:

Time(_Hour+12*If(_AMPM="PM",1,0) - If(_Hour=12,12,0),_Min,0)

or

Time(_Hour+If(_AMPM="PM",12,0) - If(_Hour=12,12,0),_Min,0)

The issue is that 12:00AM is really zero hours...

Russ

[ April 17, 2002, 05:12 PM: Message edited by: Russell Baker ]

This topic is 8256 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.