I like Fred's calc since it is shorter. I would write a small function that
accepts the month and year (or a date) and returns -1, 0, 1 based on if an
hour is removed, added, or no effect.
SELECT
tblDates.Start_Date,
tblDates.End_Date,
(DateDiff('d',[End_Date],[Start_Date])-1)*-1 AS Days,
IIf((DatePart("m",tblDates.Start_Date)=4),(Days*24)-1,IIf((DatePart("m",tblDates.Start_Date)=10),(Days*24)+1,(Days*24))) AS Hours
FROM tblDates;
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.