Time sort

libin04

New member
Local time
Today, 09:35
Joined
Aug 10, 2022
Messages
18
can you anyone help to create MS Quarry to short the time i mean ascending descending in the quarry .
 
Yes, most people here can help.

But you will need to provide more details.

What have you tried already?

What is the table/tables involved?

What are the field names and their datatypes?
 
you can try with Normal query:
ascending
Code:
SELECT * FROM yourTableName ORDER BY TheShortTimeField ASC;
or, descending:
Code:
SELECT * FROM yourTableName ORDER BY TheShortTimeField DESC;
 
Yes, most people here can help.

But you will need to provide more details.

What have you tried already?

What is the table/tables involved?

What are the field names and their datatypes?
Hi Cheeky Buddha, I have attached the DB. kindly check in Quarry name "HI" I am trying to bring IN time and OUT time.
 

Attachments

Code:
SELECT Activity.*
FROM Activity
ORDER BY Activity.Cdate, Activity.Stime;
 
Do not confuse how a date is formatted (short time) with how it is stored. If you are using an actual date data type, your field includes a date as well as the time and you want it to. Otherwise, how could you separate days? Internally dates are stored as double precision numbers with the integer portion representing the number of days since Dec 30, 1899 (for Jet/ACE, other RDBMS' use a different origin date. SQL Server uses 1/1/1900) and the decimal portion is the elapsed time since midnight and can contain significant decimal places. We use the short time format to make the time comprehensible to humans.

But, one important thing to remember - NEVER, EVER format a date/time for sorting. Always sort on the raw data field and just format for display.
 

Users who are viewing this thread

Back
Top Bottom