speakers_86
Registered User.
- Local time
- Today, 11:44
- Joined
- May 17, 2007
- Messages
- 1,919
I need someone more knowledgeable than me to check my logic. I have this:
It SEEMS to work just fine. But let me explain what it does.
I have a table with entries, one of the fields is date, and it stores now(), minus the time zone adjustment.
Now on to my query where the above code is. I am trying to query all entries where the DAY is equal to now() minus the time zone adjustment. So if now()-TimeZoneAdjustment = 10/11/2010 13:35, then I want to return all records that have dates of 10/11/2010, regardless of the time of day.
Like I said my code works, but I am not sure if I should rely on it. For instance, what happens on when the month and day are only one digit long? Would the code break all of a sudden, since the left function suddenly includes the hour of the day?
edit- Is it really as simple as changing the format? If so, I feel really dumb...
Code:
Like Left(DateAdd("h",[forms]![frmSettings]![timezoneadjustment],Now()),8) & "*"
I have a table with entries, one of the fields is date, and it stores now(), minus the time zone adjustment.
Now on to my query where the above code is. I am trying to query all entries where the DAY is equal to now() minus the time zone adjustment. So if now()-TimeZoneAdjustment = 10/11/2010 13:35, then I want to return all records that have dates of 10/11/2010, regardless of the time of day.
Like I said my code works, but I am not sure if I should rely on it. For instance, what happens on when the month and day are only one digit long? Would the code break all of a sudden, since the left function suddenly includes the hour of the day?
edit- Is it really as simple as changing the format? If so, I feel really dumb...
Last edited: