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.
| Author |
Topic |
|
rrb
SQLTeam Poet Laureate
1479 Posts |
Posted - 2002-04-16 : 02:35:23
|
| Greetings orlJust had my server swapped from underneath me and have the ubiquitous US date format problem.my query isselect convert(datetime, weeekending, 112) as wkfrom tTIMEwhich returns "2002-04-06 00:00:00.000" in QAmy asp ismperiod = CDate(rst.Fields("wk"))response.write month(mperiod)which returns 4 (as it should) on the old server and 6 on the new server!Any clues?PS regional settings on the new server are identical to that on the old server - "dd/mm/yyyy"--I hope that when I die someone will say of me "That guy sure owed me a lot of money"Edited by - rrb on 04/16/2002 02:39:00 |
|
|
rrb
SQLTeam Poet Laureate
1479 Posts |
Posted - 2002-04-16 : 02:50:03
|
| Oops - just worked it out...it was the encode functionMy code was actuallymperiod = CDate(Encode(rst.Fields("wk")) )response.write month(mperiod) instead of mperiod = Encode(CDate(rst.Fields("wk")) )response.write month(mperiod) arrcgh--I hope that when I die someone will say of me "That guy sure owed me a lot of money" |
 |
|
|
|
|
|