Hello All,
A co-worker grabbed me this morning for help on a project, and her question has puzzled the (heck) out of me. I've tried everything I could think of, and to no avail. Here is what she's trying to do:
1. Start with fields maildate1 & maildate2 (these fields have input masks set to show zeros ie (08/06/2006 rather than 8/6/2006)
2. Concatenate these fields to a date range (08/06/2006-08/08/2006) in a make table query.
3. The resulting table is the recordsource of a form, and the date range can be updated by the user. This input then needs to be used to update the original date fields. I recommended she achieve this using the following syntax, as regular formatting functions didn't seem to be working:
And while trying to get this to work, we realized that no matter what she tries to do, it is not retaining the zeroes when being converted to text, and therefore causing the above statement to error when either month or year is represented by a 1 digit number.
Is there any way we can get these zero's to display in the text output of the query in step 2, and allow for this update? Any advice would be GREATLY appreciated, this is driving her (and now me) nuts!
Thanks a lot,
Alex
It's a magical time of year in Philadelphia. Eagles training camp marks the end of another brutal season of complaining about the Phillies.
A co-worker grabbed me this morning for help on a project, and her question has puzzled the (heck) out of me. I've tried everything I could think of, and to no avail. Here is what she's trying to do:
1. Start with fields maildate1 & maildate2 (these fields have input masks set to show zeros ie (08/06/2006 rather than 8/6/2006)
2. Concatenate these fields to a date range (08/06/2006-08/08/2006) in a make table query.
3. The resulting table is the recordsource of a form, and the date range can be updated by the user. This input then needs to be used to update the original date fields. I recommended she achieve this using the following syntax, as regular formatting functions didn't seem to be working:
Code:
CDate(Left([maildate_1],2) & "/" & Mid([maildate_1],4,2) & "/" & Mid([maildate_1],7,4))
And while trying to get this to work, we realized that no matter what she tries to do, it is not retaining the zeroes when being converted to text, and therefore causing the above statement to error when either month or year is represented by a 1 digit number.
Is there any way we can get these zero's to display in the text output of the query in step 2, and allow for this update? Any advice would be GREATLY appreciated, this is driving her (and now me) nuts!
Thanks a lot,
Alex
It's a magical time of year in Philadelphia. Eagles training camp marks the end of another brutal season of complaining about the Phillies.