Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Date field manipulation

1 view
Skip to first unread message

GeoDude

unread,
Aug 12, 2004, 4:05:23 PM8/12/04
to
I have a "date" field in my table in the Month/Day/Year format. I
would like to change all the "Day" values to 1. There are about 2500
records to change.
Is there a query to change all the "Day" values to 1 in the date
field.

Thanks,

Ivan

fredg

unread,
Aug 12, 2004, 4:21:20 PM8/12/04
to

The format of the date doesn't matter.
Do you mean you wish to permanently change all dates, such as
9/14/2003 and 12/24/2002 to 9/1/2003 and 12/1/2002, etc.?

Run an update query.
Update YourTable Set YourTable.DateField =
DateSerial(Year([DateField]),Month([DateField]),1);

--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.

HJ

unread,
Aug 12, 2004, 4:30:05 PM8/12/04
to
Create an update query, use the DateSerial and Format commands (see Access
Help): DateSerial(Format(YourDate,"yyyy"), Format(YourDate,"mm"),1).

HJ

"GeoDude" <iab...@hotmail.com> wrote in message
news:hajnh09hie72l4sfb...@4ax.com...

0 new messages