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

Time Parameter

Status
Not open for further replies.

BlurredVision

Technical User
Aug 6, 2001
326
GB
Could someone share with me the best way to strip out the time from a datetime field to be used in a parameter. I am attempting to get the time to be displayed in the following format HH:MMPM within the parameter.

Thanks for your help.
 
You don't need to strip it out at all, place it on the report canvas, right click it and select format field->Datetime->Customize.

You have options to only display the time, with plenty of choices on formatting.

-k
 
Something like TOtext({Date}, "hh:mm") for the date, and then tack on a formual field that checks the hour and says "AM" or "PM"

It helps to give your Crystal version, since newer versions have extra options, and some extra problems. I use Crystal 8.5

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Thanks Synapsevampire, but I need the formatting to be done for a parameter. BTW, I am using v10
 
It doesn't matter if it's a parameter, you can still change the formatting.

Perhaps you mean that you want to change the way the parameter is displaying the time?

-k
 
Yeah.. They way the parameter is displaying the time... Sorry about that.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top