| | |
|
|
|
Update a date value to 1st of month |
| message from Tim on 13 May 2004 |
Hi
I have an update query that places a load of snapshots
into a table storing month data for trend analysis. I
hvae to do this every month.
Ideally, Id like to just have 'Jan 04, Feb o4' but the
Data data type cannot accept that and needs a full date.
I need it as a date data type so its puts the trend data
in chronological order.
Problem. The snapshot will add the current date (now() )
which is ok. Is there away of updating that so the date
given is the 1st day of that month eg
4/4/04 becomes 1/4/04
20/4/04 becomes 1/4/04 etc
TIA
Tim
|
| Wayne Morgan replied to Tim on 13 May 2004 |
Try the following equation as the Update To value.
DateSerial(Year(Date()), Month(Date()), 1)
This will return a value of the first day of the month for the current month
and year.
|
| Tim replied to Wayne Morgan on 13 May 2004 |
Nice one Wayne, thanks
for the current month
message
date.
data
|
|
Archived message: Update a date value to 1st of month (Microsoft Access Forms)