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

date/time fields to just dates

P: n/a
I'm struggling once more with the dates in one of my Access projects..

I'd like the date/time fields to be just date fields.. its just
confusing the folks using the database, and its making it harder to
summarise the data by day in my reports...

I think the dates are stored in front of the decimal and the time is
stored after the decimal.. so it seems to me if i was storing integers
in my fields instead of real numbers I'd have the desired effect but I
don't quite have the vision of how to convert my current data to
integers, and how to make sure further data is entered as integers..
Am I way off down the wrong path??

Thanks
Helen
--
hr******@axion.net Nanaimo, Vancouver Island, BC Canada
Nov 13 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
On Thu, 14 Jul 2005 21:59:46 GMT, Helen R Martin wrote:
I'm struggling once more with the dates in one of my Access projects..

I'd like the date/time fields to be just date fields.. its just
confusing the folks using the database, and its making it harder to
summarise the data by day in my reports...

I think the dates are stored in front of the decimal and the time is
stored after the decimal.. so it seems to me if i was storing integers
in my fields instead of real numbers I'd have the desired effect but I
don't quite have the vision of how to convert my current data to
integers, and how to make sure further data is entered as integers..
Am I way off down the wrong path??

Thanks
Helen


In the future, you can store a date time value as just a date by using
= Date(), not = Now().
To convert current data to exclude a time value, you can run an update
query:
Update YourTable Set YourTable.DateField = Int([DateField]);

--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Nov 13 '05 #2

P: n/a
If you want to keep the times, but not display them, create a query that
uses the DateValue function on your date fields, and use the query wherever
you would otherwise have used the table.

If you want to remove the times, my recommendation would be to add a new
date field to your table, run an Update query that uses the DateValue
function to set the new date field to only the date portion, then delete the
original date field once you know everything's correct.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"Helen R Martin" <hr******@nospam.axion.net> wrote in message
news:mfBBe.132838$tt5.78045@edtnps90...
I'm struggling once more with the dates in one of my Access projects..

I'd like the date/time fields to be just date fields.. its just confusing
the folks using the database, and its making it harder to summarise the
data by day in my reports...

I think the dates are stored in front of the decimal and the time is
stored after the decimal.. so it seems to me if i was storing integers in
my fields instead of real numbers I'd have the desired effect but I don't
quite have the vision of how to convert my current data to integers, and
how to make sure further data is entered as integers..
Am I way off down the wrong path??

Thanks
Helen
--
hr******@axion.net Nanaimo, Vancouver Island, BC Canada

Nov 13 '05 #3

P: n/a
Douglas J. Steele wrote:
If you want to keep the times, but not display them, create a query that
uses the DateValue function on your date fields, and use the query wherever
you would otherwise have used the table.

If you want to remove the times, my recommendation would be to add a new
date field to your table, run an Update query that uses the DateValue
function to set the new date field to only the date portion, then delete the
original date field once you know everything's correct.


ahh.. how do I do I set the new date field to only the date portion..
that would definately be helpful.. I thought the date/time format
always included both..

Helen
--
hr******@axion.net Nanaimo, Vancouver Island, BC Canada
Nov 13 '05 #4

P: n/a
"Helen R Martin" <hr******@nospam.axion.net> wrote in message
news:Q2CBe.91485$wr.18594@clgrps12...
Douglas J. Steele wrote:
If you want to keep the times, but not display them, create a query that
uses the DateValue function on your date fields, and use the query
wherever you would otherwise have used the table.

If you want to remove the times, my recommendation would be to add a new
date field to your table, run an Update query that uses the DateValue
function to set the new date field to only the date portion, then delete
the original date field once you know everything's correct.


ahh.. how do I do I set the new date field to only the date portion..
that would definately be helpful.. I thought the date/time format always
included both..


As I said, use the DateValue function to extract only the date from the
stored date/time.

If you're asking how to only store the date, with no time, on a go-forward
basis, use the Date function rather than the Now function.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

Nov 13 '05 #5

P: n/a
"Helen R Martin" <hr******@nospam.axion.net> wrote in message
news:Q2CBe.91485$wr.18594@clgrps12...
Douglas J. Steele wrote:
If you want to keep the times, but not display them, create a query that
uses the DateValue function on your date fields, and use the query
wherever you would otherwise have used the table.

If you want to remove the times, my recommendation would be to add a new
date field to your table, run an Update query that uses the DateValue
function to set the new date field to only the date portion, then delete
the original date field once you know everything's correct.


ahh.. how do I do I set the new date field to only the date portion..
that would definately be helpful.. I thought the date/time format always
included both..


As I said, use the DateValue function to extract only the date from the
stored date/time.

If you're asking how to only store the date, with no time, on a go-forward
basis, use the Date function rather than the Now function.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

Nov 13 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.