By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,963 Members | 1,784 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,963 IT Pros & Developers. It's quick & easy.

Delete time part of date time value

P: n/a
From an Excel-import I have an access table with a datetime field of wich
both date and time are entered. I've set the field's notation properties to
Short Date. When I view the table in tableview I only see the date but when
I click in the field I see date and time. Is there an easy way to delete all
the time values in that field? as I don't need them.
Thanks in advance,
john

Oct 26 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"john" <jo**@test.comschreef in bericht
news:P7********************@casema.nl...
From an Excel-import I have an access table with a datetime field of wich
both date and time are entered. I've set the field's notation properties
to Short Date. When I view the table in tableview I only see the date but
when I click in the field I see date and time. Is there an easy way to
delete all the time values in that field? as I don't need them.
I found the answer: an editquery where an empty datefield is filled with
DateValue([MyDateField])
john
Oct 26 '06 #2

P: n/a
Use DateValue() to get just the date from the date/time field.

1. Create a query using this table.

2. Change it to an Update query (Update on Query menu.)
Access adds an Update row to the query design grid.

3. Drag the date/time field into the grid.
In the Criteria row, enter:
Is not Null.

4. In the Update row under this field, enter:
DateValue([d])
substituting the name of your field for "d".

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"john" <jo**@test.comwrote in message
news:P7********************@casema.nl...
From an Excel-import I have an access table with a datetime field of wich
both date and time are entered. I've set the field's notation properties
to Short Date. When I view the table in tableview I only see the date but
when I click in the field I see date and time. Is there an easy way to
delete all the time values in that field? as I don't need them.

Oct 26 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.