RichO
Registered Yoozer
- Local time
- Yesterday, 19:52
- Joined
- Jan 14, 2004
- Messages
- 1,036
I have a table that contains a date field. Normally this field is populated from a form where the user types in a date in the format of mm/dd/yyyy. This works just fine.
In some instances I am using VBA/SQL with DateAdd to populate the field to contain a date 3 weeks prior to another date field on the form.
DateAdd("d", -21, Me. Job_Date)
Say the job date field contains 12/28/2014, so then I want the resulting value to be 12/7/2014. When I view this value within the SQL it is correct, but once that value is inserted into the table and I view the table it comes out as
12:01:04 AM
I went into the table properties and changed the format to short date (mm/dd/yyyy) but then this entry now displays as
12/30/1899
...and when I click on that field in the table it then changes to the above time based value.
All of the rest of the dates in the table display as mm/dd/yyyy.
What do I need to do to fix this?
Thanks
In some instances I am using VBA/SQL with DateAdd to populate the field to contain a date 3 weeks prior to another date field on the form.
DateAdd("d", -21, Me. Job_Date)
Say the job date field contains 12/28/2014, so then I want the resulting value to be 12/7/2014. When I view this value within the SQL it is correct, but once that value is inserted into the table and I view the table it comes out as
12:01:04 AM
I went into the table properties and changed the format to short date (mm/dd/yyyy) but then this entry now displays as
12/30/1899
...and when I click on that field in the table it then changes to the above time based value.
All of the rest of the dates in the table display as mm/dd/yyyy.
What do I need to do to fix this?
Thanks