Update Query w/ Date from the table

  • Thread starter Thread starter Nick
  • Start date Start date
N

Nick

One of the fields (picDate) in my table is a type Date
(mm/dd/ccyy). I have images on my local drive categories
under different dates e.g. C:\Images\2003719 (for July
19th images) and C:\Images\2003720 (and so on).

I added a new field that would contain the Path Name type
text (C:\Images\2003719) for my images in my table. The
date part is what needs to come from picDate field....

How do I update this new field for each record by using
the picDate? Any help would be appreciated.

Thanks.
 
Try using the format function to return the date in your desired format.

Format(PicDate,"yyyymd") to return your date as a string.

I would use
Format(PicDate,"yyyymmdd") to avoid ambiguity for such dates as

2003 01 12 and 2003 11 02 which would in your schema both return 2003112

A little lesson, Date/Times are actually stored in Access as a number of the
type double. The integer portion represents the number of days from 12/30/1899
while the decimal portion represents the time of day as fraction of the day.
Access DISPLAYS the date and time in whatever format you specify or if no format
is specified it grabs the format from your Operating System settings.
 
Back
Top