![]() |
| |||||||
![]() | « Previous Thread | Next Thread » |
| | LinkBack (1) | Thread Tools | Display Modes |
| |||
| Hi, I have this sql code Code: str="SELECT * FROM Registration where ExpirationDate < getdate() order by convert(smalldatetime,ExpirationDate) desc" The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value. ExpirationDate is a varchar field todd |
| Sponsored Links |
| ||||
| you need to convert the field, like you did in your ORDER BY clause ... like so Code: str="SELECT * FROM Registration where convert(smalldatetime,ExpirationDate) < getdate() order by convert(smalldatetime,ExpirationDate) desc"
__________________ Quote of the Month: Strife: As long as we have each other, we'll never run out of problems. Questions to Ponder: Should vegetarians eat animal crackers? iif([sarcasm]=true,iif([you have to ask]=true,"didn't work","ha ha ha"),"not sarcasm") copyright © 2008 sbenj69 |
![]() |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Display Assembly File Date And Time | Wolffy | .Net | 0 | April 9th, 2008 11:57 AM |
| Date Last Modified for ASP Pages | mehere | Classic ASP | 0 | March 21st, 2008 12:20 PM |
LinkBacks (?)
LinkBack to this Thread: http://www.developerbarn.com/sql-development/180-date-problem.html | ||||
| Posted By | For | Type | Date | |
| Team Wolfguard Solutions - Resources | This thread | Refback | May 14th, 2008 03:11 PM | |
| Sponsored Links |
| ASP.NET Resource Index a directory of ASP.NET tutorials, applications, scripts, assemblies and articles for the novice to professional developer. Free Web Directory Including Chats and Forums Resources, Offer automatic, instant and free directory submissions. | URLZ Web Directory URLZ Web Directory Free Web Directory - Add Your Link The Little Web Directory | Free Web Directory Pegasus free web directory is a free directory organised by categories. Web Directory & SEO Services dirroot web directory |