INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

#### Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

# Date Time Display

## Date Time Display

(OP)
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.

### RE: Date Time Display

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
www.decisionfirst.com

### RE: Date Time Display

(OP)
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))

### RE: Date Time Display

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
www.decisionfirst.com

#### Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

#### Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Close Box

# Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!