Find Max Date With Time Stamp

G

Guest

I need a query that will find the latest date or time. I have used the MAX
query, but that is not working.

Here's what I have.

9/15/2004 10:29:10 AM
9/15/2004 12:08:41 PM
9/15/2004 4:01:05 PM

I need the date from the line 9/15/2004 4:01:05 PM. I have tried to parse
this out with DateValue and TimeValue, but it still isn't working.

Thoughts?
 
B

Brendan Reynolds

Max should work if this were a Date/Time field, so I'm guessing its a Text
field. In that case, something like this should work ...

SELECT Max(CDate([TestText])) AS MaxDate
FROM tblTest2;
 
G

Guest

Actually, this is categorized as a "Date/Time" field on the table.

Other ideas?


Brendan Reynolds said:
Max should work if this were a Date/Time field, so I'm guessing its a Text
field. In that case, something like this should work ...

SELECT Max(CDate([TestText])) AS MaxDate
FROM tblTest2;

--
Brendan Reynolds
Access MVP


Paperback Writer said:
I need a query that will find the latest date or time. I have used the MAX
query, but that is not working.

Here's what I have.

9/15/2004 10:29:10 AM
9/15/2004 12:08:41 PM
9/15/2004 4:01:05 PM

I need the date from the line 9/15/2004 4:01:05 PM. I have tried to parse
this out with DateValue and TimeValue, but it still isn't working.

Thoughts?
 
G

Guest

Post the entire SQL statement. If it is a Date/Time field, something else is
going on.
--
Jerry Whittle
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


Paperback Writer said:
Actually, this is categorized as a "Date/Time" field on the table.

Other ideas?


Brendan Reynolds said:
Max should work if this were a Date/Time field, so I'm guessing its a Text
field. In that case, something like this should work ...

SELECT Max(CDate([TestText])) AS MaxDate
FROM tblTest2;

--
Brendan Reynolds
Access MVP


Paperback Writer said:
I need a query that will find the latest date or time. I have used the MAX
query, but that is not working.

Here's what I have.

9/15/2004 10:29:10 AM
9/15/2004 12:08:41 PM
9/15/2004 4:01:05 PM

I need the date from the line 9/15/2004 4:01:05 PM. I have tried to parse
this out with DateValue and TimeValue, but it still isn't working.

Thoughts?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top