Changing auto-date rollover time???

Steve@trop

Registered User.
Local time
Today, 00:56
Joined
May 10, 2013
Messages
148
I'm creating a new thread similar to one of the same title that is a bit old.

I have a date/time field on a form that has the default set to "=now()" which puts in the system date and time. I need to change it so that the date changes to the next day any time after 11:00 PM (instead of midnight). This is because our third shift starts their day at 11:00. If they start entering data right away, alot of their work shows up on the wrong (to them anyway) workday date. I'm struggling with the expression builder to get this to work.

Does anybody have a good solution for this?

In the other thread someone suggested changing the time to be an hour ahead but that will affect the entire day when I just want to change the date for one hour per day.

Thanks,

Steve
 
The "someone" you speak off I believe was me....

You cant "just change the date" ... Date and time are ONE

So if it is after 11 PM today (mar 31) you want to "make believe" it is actually already 11 PM tomorrow (apr 1st) ??

For shifting the full day: Now() + IIF(Hour(now())>=23,1,0)
For shifting the one hour: Now() + IIF(Hour(now())>=23,1/24,0)

If you have a split date and time field... it still can work the same but splitting the date and time field isnt really "the best way" of doing it, because date and time are one and the same thing.
 
Thanks Namliam, sorry I forgot to attribute the suggestion to you...

Yes, I want to "pretend" the date is the next day when they are entering records between 11 PM and 12 AM. The users have been complaining about this issue for a while. They consider any time after 11 PM to be the next day on third shift. Some of the reports have been missing data because they expect it to appear on the next day. Most workplaces around here have shifts that go from 3-11, 11-7, 7-11 which is fine except for the date problem between 2nd and 3rd shift.

I have a second date/time field that shows the correct date the record was entered.

Thanks for your solution, I'll give it a try!

Steve
 
The odd thing about the date/time combination is that it shall / should show work being done from
31/3 00:00:00 - 07:00:00 and 23:00:00 to 00:00:00, though "in the wrong order" but if that is your business rule.... guess it works for "them"

For shifting a day, you can also use: Date() + IIF(Hour(now())>=23,1,0)
If you are trully intresting in the date part only
 

Users who are viewing this thread

Back
Top Bottom