Standard Time/ Daylight Savings time
FORM:
A5=Now()
IIF([A5] between #3/12/2017 2:00:00:00 AM# and #11/5/2017 2:00:00:00 AM#,”Standard”,”Daylight”)
This Doesn’t work, What do I need to change this too?
Standard Time/ Daylight Savings time
FORM:
A5=Now()
IIF([A5] between #3/12/2017 2:00:00:00 AM# and #11/5/2017 2:00:00:00 AM#,”Standard”,”Daylight”)
This Doesn’t work, What do I need to change this too?
"Doesn't work" tells us nothing at all.
I would think the two descriptions need to be swopped.
Iif(Month([A5])+Day([A5])/100.00 Between 3.13 AND 11.04,"Daylight","Standard")
(I'm not sure abouth months and days here - never couldn't grasp US date formats)
There are a couple of things that are wrong.Code:IIF([A5] between #3/12/2017 2:00:00:00 AM# and #11/5/2017 2:00:00:00 AM#,”Standard”,”Daylight”)
1) there are too many 00's in the time string. Should be> hh:mm:ss. (3 groups) ..... You have 4 groups of numbers .....
2) the "double quotes" are wrong ASCII value.
This works in a query
Code:test: IIf([A5] Between #3/12/2017 2:00:00 AM# And #11/5/2017 2:00:00 AM#,"Standard","Daylight")
Steve thanks for the correction on the time.
I copied the code you suggested, and I got this error:
You may have entered a comma without a preceding value of identifier.
You are close to the solution, any more thoughts?
Did you change the symbols around Standard and Daylight to double quotes?
Look at this....
Steve
After I corrected the the extra 00's, It still wasn't accepting the code, and Yes I went back to my original with the ",", and it still wasn't working, access kept changing the code when I tried to save it. It kept putting [] brackets in.
=IIF([A5]Between #3/12/2017 2:00:00 AM# and #11/5/2017 2:00:00 AM #,”[Standard]”,”[Daylight]”)
=IIF([A5]Between #3/12/2017 2:00:00 AM# and #11/5/2017 2:00:00 AM #,”Standard”,”Daylight”)
I tried this several times and each time it kept putting the brackets in, then without any changes it all of a sudden accepted is, and it now works fine.
All is OK now, thanks very much for your input.
Glad you got it working....