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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using CSTR

Status
Not open for further replies.

LeonelSanchezJr

Programmer
Jan 26, 2001
522
US
I have the following formula in my report.

formula = cstr(cdatetime({eaxhawbmawb.destdep}),"dd MMM yyyy HH:mm")

It works great except when the time is equal to 12:00 a.m.,
the formula display 00:00

Any ideas?
Thanks,

Leo ;-)
 
If you want to replace it with something else, write an IF..THEN..ELSE condition.

If RIGHT(formula,"00:00") then
mid(formula,1,len(formula)-5) & "12 AM"

NOTE:where 5 is equal to the number of characters in "00:00"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top