Last post Mar 06, 2008 10:12 PM by abhishek saxena
Mar 15, 2007 07:09 AM|rrobet|LINK
I have embedded classic asp code into WSS using “page viewer” web part. Which is working fine. The problem is with the date format. In asp application I require the date to be in dd/mm/yyyy format. If
I run the asp code within WSS the date format is mm/dd/yyyy while if I run it on its own (outside WSS), the date appears as how I wanted.
FYI, I have only got WSS not SharePoint Portal. According to someone’s advice in one of the forum, I have even tried changing the date format under “regional settings” to “English (Australia)” but no use.
I am still getting an error saying:
Microsoft OLE DB Provider for SQL Server
The conversion of char data type to smalldatetime data type resulted in an out-of-range smalldatetime value.
Just because the date is not in dd/mm/yyyy format. Please help.
Mar 15, 2007 11:50 AM|Brian@Planet|LINK
When you run the asp code as standalone vs within wss, is it accessing the same db server? Is it the same IIS box?
Are all components of the system set for English(Austrailia), not only WSS, but the hosting windows boxes and sql?
Mar 15, 2007 08:50 PM|rrobet|LINK
The server's date is in English UK, I have tried changing it to English Australia, but no use. I won't be dare to disturb the SQL server's collation format as there are important databases involved.
I have decided to change my asp code. I could have done this earlier if I just need to modify the code in 1 or 2 places but I will end up doing it at more then 200 places. I got no choice I guess. Please let me know if you got other alternative solutions.
Mar 16, 2007 12:49 PM|Brian@Planet|LINK
Well, I'm not sure it this will help but it's simple to try, you can specify the LCID per page <%@LCID=1037%> or <%@LANGUAGE="VBSCRIPT" LCID=1037%>
Otherwise I'm seeing similar reports and most of them are manually fixing the strings. Obviously change the LCID value to your region.
Mar 16, 2007 08:56 PM|rrobet|LINK
You are just amazing Brian. YES, it does work. <%@LCID=1037%>. GREAT. In fact, I have seen this segment of code in some of the asp files, but I never bothered to know
what is that all about. It always better to add that 1 line of code in every page rather than modifying every single code. Thanks Brian.
Mar 06, 2008 10:12 PM|abhishek saxena|LINK
Thanks a ton
this post saved my life [:D]