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 Time Display 1

Status
Not open for further replies.

jchewsmith

Technical User
Nov 20, 2006
161
US
If DayOfWeek({SSRpt_ShippingOnTime.Order Created}) = 7
Then DateTime(DateSerial(Year({Order Created}),Month({Order Created}),Day({Order Created})+2),(Time(8,0,0),100))
Else
If DayOfWeek({Order Created}) = 1
Then DateTime(DateSerial(Year({Order Created}),Month({Order Created}),Day({Order Created})+1),Time(8,0,0))
Else {Order Created}


I have this formula to change the start date to Monday at 8:00 am if the order is placed Saturday or Sunday. This displays as 1/1/2016 1:00:00 PM.

First I want this to display as 1/1/2016 13:00:00?

Second I want to add if after 5:00 PM on Friday also change to Monday at 8:00 am.
 
Change the formula to something like this:

If DayOfWeek({SSRpt_ShippingOnTime.Order Created}) = 7
Then DateTime(DateSerial(Year({Order Created}),Month({Order Created}),Day({Order Created})+2),(Time(8,0,0),100))
Else
If DayOfWeek({Order Created}) = 1
Then DateTime(DateSerial(Year({Order Created}),Month({Order Created}),Day({Order Created})+1),Time(8,0,0))

Else if DayOfWeek({Order Created}) = 5 and Hour({Order Created}) >= 17 then
DateTime(DateSerial(Year({Order Created}),Month({Order Created}),Day({Order Created})+3),Time(8,0,0))

Else {Order Created}

To change the format of what you're seeing on the report, right-click on the formula in the report and select "Format...". Go to the "Date and Time" tab and then on the "Customize" button. Select the "Time" tab and set the time to be "24 Hour". This will give you the format you're looking for.

-Dell

DecisionFirst Technologies - Seven-time SAP BusinessObjects Solution Partner of the Year
 
I tried your formula above and am getting this error:

The ) is missing. and it appears to be in this part of the formula (Time(8,0,0,100))
 
In the second line of the statement, change "(Time(8,0,0),100)" to "Time(8,0,0)". This is in what you originally posted. Other than that, I don't see any obvious issues. Did you copy and paste this into the report or did you type it? If you typed it, there may be a missing ")".

-Dell

DecisionFirst Technologies - Seven-time SAP BusinessObjects Solution Partner of the Year
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top