Unable to Sort Date stored in dd/MM/yyyy format in MS Access database

Last Reply on Jul 16, 2015 02:44 AM By Shashikant

Posted on Jul 15, 2015 08:46 AM

i have written following query

 

select *  from lab_info order by p_date DESC

 

this query executed successfully and retured all rows but problem is that last inserted record which should be seen first.

but it shows in the middle of rows.

i have inserted record in "dd/MM/yyyy" format.

for exp:

result like this

p_date

------

24/06/2015

15/07/2015

06/07/2015

here in above sequence of record 24/06/2015 should be last in as per query result but it shows on first position please give solution for this.

 

Posted on Jul 16, 2015 02:44 AM

Hi Prasunjeet,

Please let me know the Data type of p_date if it is DateTime then it is possible to Sort.And in Database date gets stored in 'yyyy-mm-dd' format

I hope this will help you out.