I am trying to run a query that looks at data/time. The expression i have so far isn't working and i need some suggestions please.
Use Date2: IIf(([Use Date]<"#03:00:00 PM#"),[Use Date]+1,[Use Date])
So what i need is for this to look at [Use Date] and if [Use Date] is before 03:00:00 PM then [Use Date2] = [Use Date]. If [Use Date] is after 03:00:00 PM then have it add 1 day. So if it is 09/10/14 03:23:15 PM then [Use Date2] = 09/11/14 03:23:15 PM.
I also tried
Use Date2: IIf(([Use Date]<"#03:00:00 PM#"),DateAdd("d",1,[Use Date]),[Use Date])
and
Use Date2: IIf(([Use Date]<"mm/dd/yyyy #03:00:00 PM#"),DateAdd("d",1,[Use Date]),[Use Date])
this one gets me closer, it is adding the 1 day to all of them not just the one after 3 pm
Thanks
Use Date2: IIf(([Use Date]<"#03:00:00 PM#"),[Use Date]+1,[Use Date])
So what i need is for this to look at [Use Date] and if [Use Date] is before 03:00:00 PM then [Use Date2] = [Use Date]. If [Use Date] is after 03:00:00 PM then have it add 1 day. So if it is 09/10/14 03:23:15 PM then [Use Date2] = 09/11/14 03:23:15 PM.
I also tried
Use Date2: IIf(([Use Date]<"#03:00:00 PM#"),DateAdd("d",1,[Use Date]),[Use Date])
and
Use Date2: IIf(([Use Date]<"mm/dd/yyyy #03:00:00 PM#"),DateAdd("d",1,[Use Date]),[Use Date])
this one gets me closer, it is adding the 1 day to all of them not just the one after 3 pm
Thanks
Last edited: