If statement - standard time or daylight savings?

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
 
C

Carlos

-----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#. :)
 
J

Joe Harman

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
 
T

Tim Ferguson

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top