If statement - standard time or daylight savings?

  • Thread starter Thread starter Carlos
  • Start date Start date
C

Carlos

I need to create an if statement to determine whether the
present date falls within daylight savings time or
standard time. The problem is that this does not change
on the same date every year. I believe it changes the
last Sunday in October, and the last Sunday in April.
How can I construct an If statement for this. e.g.
If Date() between #last sunday of April# and #last sunday
of October# then

Any help greatly appreciated.

Thank You
 
-----Original Message-----
I need to create an if statement to determine whether the
present date falls within daylight savings time or
standard time. The problem is that this does not change
on the same date every year. I believe it changes the
last Sunday in October, and the last Sunday in April.
How can I construct an If statement for this. e.g.
If Date() between #last sunday of April# and #last sunday
of October# then

Any help greatly appreciated.

Thank You
.
Make that #first sunday of April#. :)
 
You will probably have to build a function or functions
that is passed the year then figure out the date of the
last Sunday of April and/or Last Sunday of October.

If you need more help, I can come up with something. I
used to have a program that figured out the date of the
variable holidays, e.g., Memorial Day, Labor Day, etc.

Joe
 
But have now discovered that the Between ... And
function is an SQL function, and not Visual Basic. Is
there a VB equivalent to the Between ... And function?

If dtLowerDate <= dtTemp And dtTemp <= dtUpperDate Then


HTH


Tim F
 
Back
Top