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!

Two Trciky Questions

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi
I have two simple but tricky questions when dealing with the field formulas.

1) I want my dates to display Am and PMs but not Military time.

I have used following field formula to do that, but what i see is ... 13:30PM-14:30 pm like that!!!

but i need 1:30PM-2:30PM likewise....

can anybody help me!!!

2) second one is------------->>>>

I have to display Days as M-MOnday,T-tuesday ...like wsie
in a row as 'MT....'

what I have to do is i have to put a comma between them if more than one day exists..like M','T...
and if only one field exists then this comma should not appear.

the code is as follows::
if {@mon} <> ' ' or {@tues} <> ' ' or {@wed} <> ' ' or {@thurs} <> ' ' or {@fri} <> ' ' or
{@sat} <> ' ' or {@sun} <> ' ' then
totext({@mon}) + totext({@tues}) + totext({@wed}) + totext({@thurs}) + totext({@fri}) +
totext({@sat}) + totext({@sun})
else
&quot;TBA&quot;

I have to add a comma if more than one day exists!!!

help appreciated
 
1) If the field is a date field, you can format it any way you like without formulas. Select the field and use menu options &quot;Foramt - Field&quot;

2)Do you have multiple dates in the same record (very rare) or are you doing this once per group? Will the dates be consecutive or could you have T,W,F Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top