April 9, 200223 yr I'm trying to get text, date, and time fields into a text single. Everything works fine, but I want time displayed as "hh:mm AM/PM", it comes out in 24 hour notation w/o AM or PM. Does anyone know how to get 12 hour notation? -Heather
April 9, 200223 yr If you go to Format/Time, there is an option to put it in 24 or 12 hour notation, or format as you specify. Is that what you are looking for? Ken
April 9, 200223 yr Author No, I'm trying to incorporate the time field into the body of an email, so it needs to be in text format in a text field, mixed with several other types of data. Any ideas?
April 9, 200223 yr Heather, Use this calculation for the text of a field called "Time": code: if(Hour(Time) > 12, Hour(Time)-12&":"&Right("00"&Minute(Time),2)&"PM",Hour(Time)&":"&Right("00"&Minute(Time),2)&"AM") This will give you single hour figures for hours less than 10. IF you want a leading zero for the hours then use: code: if(Hour(Time) > 12, Right("00"&Hour(Time)-12,2)&":"&Right("00"&Minute(Time),2)&"PM",Right("00"&Hour(Time),2)&":"&Right("00"&Minute(Time),2)&"AM") You can include this if statement in the middle of whatever else you are using to produce your final text string. Russ [ April 08, 2002, 07:38 PM: Message edited by: Russell Baker ]
Create an account or sign in to comment