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!

Crystal Date Time 1

Status
Not open for further replies.

jchewsmith

Technical User
Nov 20, 2006
161
US
How do you change a date/time that is a weekend day to Monday at 7:00 am
 
Try:

Code:
If      DayOfWeek({Table.Field}) = 7
Then    DateTime(DateSerial(Year({Table.Field}),Month({Table.Field}),Day({Table.Field})+2),Time(7,0,0))
Else
If      DayOfWeek({Table.Field}) = 1
Then    DateTime(DateSerial(Year({Table.Field}),Month({Table.Field}),Day({Table.Field})+1),Time(7,0,0))
Else    {Table.Field}

Hope this helps

Cheers
Pete

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top