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!

Military Time

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi,
I have to change the current timngs which are in Military format to AM/PM.

now I have 13:30 - 14:40 like that

I have to change them to 1:30 PM - 2:30 PM

help appreciated
 
Right click on the time field in your report and select "Format Field". In the Format Editor, select your desired format from the "Style" list or click on "Customize", and select the "Time" tab of the Custom Style dialog.
 
when I select the format field and then format editor I can see only COMMON, BORDER and FONT tabs
theres no Style tab/button or customize tab/button....
how to take over from here
 
Sounds like Crystal sees your field as a string rather than as a DateTime data type. Try creating a formula:
TimeValue ({YourTimeStringField}
Place the formula in your report in place of the time data field; then use Format Field to select the AM-PM format you want.

If the string is a time range or has other characters in addition to the time values, you will have to parse the string to extract the time string(s) and format them.

You can test a string in your formula as follows:
If IsTime ({YourTimeStringField}) then
TimeValue ({YourTimeStringField})
Look up "Time" in the Online Help for more information.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top