Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to display AM/PM from date/time field.

Status
Not open for further replies.

stormtrooper

Programmer
Apr 2, 2001
266
CA
Hi. I have a date time field formula that looks like this:
totext({DATE_TIME_DTM},"h:mm:ss")

The time that is contained in this field has the am/pm attached to it and that's what I want to display. So far, with the above formula, I get what I want, just the time but I also need to pick up the am/pm part as well.

Please advise, thanks.
 
Could you just convert it to a time instead, then change the formatting to 12 hour with AM/PM?
Andrew Baines
Chase International
 
Another thought, change format string in your toText function:

totext({DATE_TIME_DTM},"HH*mm*ss tt")
Andrew Baines
Chase International
 
Another thought, change format string in your toText function:

totext({DATE_TIME_DTM},"HH:mm:ss tt")
Andrew Baines
Chase International
 
Thanks. I guess I didn't think it was that simple. Kind of in formula mode for the moment.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top