Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Date Query

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-06-09 : 07:14:38
kuldeep writes "I have a field “Date issue” of text data type. In this field date is stored in Dutch language with long date format. Now I want to sort data accordingly date. The problem is that, as my system cannot understand Date (because, it is in Dutch), so unable to sort."

gpl
Posting Yak Master

195 Posts

Posted - 2004-06-09 : 11:19:36
Deleted ... Im incompetent
Go to Top of Page

gpl
Posting Yak Master

195 Posts

Posted - 2004-06-09 : 11:19:36
You could convert it into a numeric format...
as I dont know the Dutch months (Im ropey on even the days of the week !) perhaps you could fill in the blanks

Im assuming you are storing your dates as dd monthname yyyy, and Im using a useful trick from this article http://www.sqlteam.com/item.asp?ItemID=15044

select .....
from .......
order by Convert(Datetime,
right(mydate, 4) +
Case Lower(ParseName(replace(mydate + '.#', ' ', '.') , 3))
when 'dutch for January' then '01'
when 'dutch for February' then '02'
....
....
when 'dutch for December' then '12'
End +
Left(mydate, 2)
,112)

you could put this functionality into a user-defined function and reuse it whenever needed
Graham
ps - hit the submit button way too soon

Go to Top of Page
   

- Advertisement -