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

Find Earliest Date no-brainer

P: n/a
How do you find the earliest of a set of dates in a field using a query? I
thought using "min" in a totals query would work but it seems to treat the
date like text. I feel a forehead slapping moment approaching ...

TIA - Keith.

Sep 18 '08 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Keith Wilby" <he**@there.comwrote in message
news:48**********@glkas0286.greenlnk.net...
How do you find the earliest of a set of dates in a field using a query?
I thought using "min" in a totals query would work but it seems to treat
the date like text. I feel a forehead slapping moment approaching ...

TIA - Keith.
Well, if the field/column you are using is formatted as a string and not as
a date, then try changing your "min" expression from:
[fieldname]

to:
cdate([fieldname])

or:
format([fieldname], "mm/dd/yyyy")

Fred Zuckerman
Sep 18 '08 #2

P: n/a
Keith Wilby wrote:
How do you find the earliest of a set of dates in a field using a
query? I thought using "min" in a totals query would work but it seems
to treat the date like text. I feel a forehead slapping moment
approaching ...

TIA - Keith.
What is it showing? The max? Something inbetween? Maybe provide your
SQL...perhaps you have some filter in the query...or if you are using a
subquery perhaps that limits the list as well. IOW, please verify all
"tables" the query links to as inner joins shouldn't be left joins or
that the "tables" are queries that filter records.

Sep 18 '08 #3

P: n/a
"Keith Wilby" <he**@there.comwrote in message
news:48**********@glkas0286.greenlnk.net...

I should add that it's an Oracle table and the data type is "Date".

Sep 18 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.