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

Date Time format

P: 4
Good morning,
I am hoping some can help me.
I need to do a count on a field but because the field contains date/ time ex 2/27/2007 09:30 and 2/27/2007 09:31 etc, it does not do the count it as 2/27/2007 instead I get multiple entries for each time minute or time period.
How do I change the format of the field to only reflect mm/dd/yy.
I tried using the short date function but it gives me the same problem since the field still contains the time value.

Hope you can help

thank you
Feb 27 '07 #1
Share this Question
Share on Google+
2 Replies


MMcCarthy
Expert Mod 10K+
P: 14,534
Try this ...
Expand|Select|Wrap|Line Numbers
  1. SELECT Count(Format([DateField], "mm/dd/yyyy"))
  2. FROM TableName;
Feb 27 '07 #2

NeoPa
Expert Mod 15k+
P: 31,186
Or :
Expand|Select|Wrap|Line Numbers
  1. SELECT Count(DateValue([DateField]))
  2. FROM TableName;
That's one (and TimeValue() of course), that I learned just recently, from Rabbit I think.
Mar 2 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.