Date field sort

  • Thread starter Thread starter ljubo lecic via AccessMonster.com
  • Start date Start date
L

ljubo lecic via AccessMonster.com

I have the table with a field of DATE type.
I want to sort the table based on the DATE field in a way
that records with the same value of the DATE field are
sorted by the TIME portion of the DATE field.
How can I acomplish this!
Thanks in advance!
 
Hmmm? If you're storing the date and time in the date/time field, then just
sort on the date field. That should give you what you seek.
 
If you have a straight date field, and sort by it, then that's exactly what
happens by default. I think you might need to give some more detail about
exactly what your problem is.
 
My table was filled through a form with corresponding DATE form field
(GENERAL DATE Format).
I am trying to make a query based on my table which will
group all the records with the same value of My_date_field and the same
value of the TIME.(GROUP BY clause).
If I write only "GROUP By My_date_field" all the records
with the same date are grouped regardles of time what I
don't want.
 
We're confused... are you using two separate fields in the table for storing
date and time?
 
My table was filled through a form with corresponding DATE form field
(GENERAL DATE Format).

The format is irrelevant: that just controls how the Double Float
number that is actually stored in the date/time field is displayed.
I am trying to make a query based on my table which will
group all the records with the same value of My_date_field and the same
value of the TIME.(GROUP BY clause).

Do you have a separate Time field? Or does your My_Date_Field contain
a time portion (when you look at it in table datasheet view)?
If I write only "GROUP By My_date_field" all the records
with the same date are grouped regardles of time what I
don't want.

I'm confused then: in your original message you asked

I want to sort the table based on the DATE field in a way
that records with the same value of the DATE field are
sorted by the TIME portion of the DATE field.

That sounds like you WANT to group by date and (within a date) sort by
time.

Please give an example of the contents of your table and how you would
like them displayed.

John W. Vinson[MVP]
 
Back
Top