Convert string to date
| From: | Harpreet K. Singh | Date: | Tue, 23 Mar 2004 18:06:03 +0000 |
| Subject: | Convert string to date | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-23238@lists.php.net to get a copy of this message | ||
I have a report that has an expiration field
I want to sort by expiration but when clicked it sorts alphanumerically and
shows january 01 before march 03 no matter what the year.
If i do select expiration and sort it works fine but if i say
select [expiration]=convert(char(10), expiration, 101) it sorts alpha
numerically.
I want to display in the format above but sort by date
Please help