472,107 Members | 1,263 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,107 software developers and data experts.

Conversion of date/ time fields

I have adatabase which daily imports data from a spreadsheet to a
named table. The spreadsheet contains one filed which is date AND time
whereas in the table I have one field being date which is formatted
to short date,.The data looks OK in the table with only a date showing
but wen I examine the date field I can expand it to see also the time.
This is causing some problems with other routines using the table.
Can anybody advise how I can actually REMOVE the time details from the
field so that I have only a date field ?

Thank you
Gerry

Oct 3 '07 #1
2 1719
Use an Update query to remove the time part of the field.

Example:
UPDATE Table1
SET Field1 = DateValue(Field1)
WHERE Field1 Is Not Null;

--
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.

"GerryWiles" <ge***@colvan.co.ukwrote in message
news:11**********************@22g2000hsm.googlegro ups.com...
>I have adatabase which daily imports data from a spreadsheet to a
named table. The spreadsheet contains one filed which is date AND time
whereas in the table I have one field being date which is formatted
to short date,.The data looks OK in the table with only a date showing
but wen I examine the date field I can expand it to see also the time.
This is causing some problems with other routines using the table.
Can anybody advise how I can actually REMOVE the time details from the
field so that I have only a date field ?

Thank you
Gerry
Oct 3 '07 #2
On Oct 3, 5:52 am, "Allen Browne" <AllenBro...@SeeSig.Invalidwrote:
Use an Update query to remove the time part of the field.

Example:
UPDATE Table1
SET Field1 = DateValue(Field1)
WHERE Field1 Is Not Null;

--
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.

"GerryWiles" <ge...@colvan.co.ukwrote in message

news:11**********************@22g2000hsm.googlegro ups.com...
I have adatabase which daily imports data from a spreadsheet to a
named table. The spreadsheet contains one filed which is date AND time
whereas in the table I have one field being date which is formatted
to short date,.The data looks OK in the table with only a date showing
but wen I examine the date field I can expand it to see also the time.
This is causing some problems with other routines using the table.
Can anybody advise how I can actually REMOVE the time details from the
field so that I have only a date field ?
Thank you
Gerry- Hide quoted text -

- Show quoted text -
Or, you could just format it for date. format(myDate,"mm/dd/yy") or
select "Short Date" in format property.

Oct 3 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by nimish | last post: by
3 posts views Thread by praba kar | last post: by
1 post views Thread by heirou | last post: by
8 posts views Thread by William Bradley | last post: by
4 posts views Thread by Annie D via AccessMonster.com | last post: by
8 posts views Thread by John Wildes | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.