rivet Posted April 17, 2002 Posted April 17, 2002 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
RussBaker Posted April 17, 2002 Posted April 17, 2002 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 ]
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now