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!

date formula 1

Status
Not open for further replies.

SamLN

Technical User
Apr 17, 2013
25
AU
Hi all tek heads
I need to report on the day of the week that a birthday will fall in the current year.
something like
birthday is 18/04/1971 which becomes 18/04/2013 therefore day displayed in the report is THURSDAY. if I ran the report next year, the day would be FRIDAY (if the 18/4/2014 is a Friday?).

thanks
Sam

 
Try:

Code:
WeekdayName(WeekDay(Date(Year(CurrentDate), Month({Data.BirthDate}), Day({Data.BirthDate}))))

I don't have access to Crystal at the moment to verify the syntax so apologies in advance if it isn't quite correct. Replace {Data.BirthDate} with the actual field from your database.

Cheers
Pete
 
Thanks Pete, that was absolutely perfect!!
 
What if you just right-click the field, go to Format Field and click "Customize". Then on the DATE tab turn off everything but the name of the day of the week.

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guides to Formulas, Parameters, Subreports, Cross-tabs, VB, Tips and Tricks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top