Wrox Programmer Forums
|
ASP Pro Code Clinic As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Pro Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 25th, 2003, 07:49 AM
Registered User
 
Join Date: Aug 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default on which factors does date depend?

hello everyone!
i have written one asp calendar in vbscript. i have used just the vbscript for it. the problem is when i host it from my computer, it works fine. and i tried in another computer as well. it works fine there as well but when i uploaded into the main server, uni's server, the calendar doesn't work properly. like 25th august is monday, but 25 falls on saturday. and when i click forward and next button for month, it gives me funny output. when i click next button for month, if 1'st of august is tuesday, then 1'st of sept. starts from wednesday. and if i click next button again, 1'st of october starts from wednesday. the thing is it works fine in my computer.

i have used just the vbscript functions for the calendar like Date. can anyone suggest why i am having such problem? someone suggested to check LCID. it is okay and i checked timesetting of the server as well. any suggesstions will be greatly appreciated.

 
Old August 25th, 2003, 09:00 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 184
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Jonax
Default

I, too, would think it was a LCID-related problem.
But if it isn't:
Are you using datepart at all?

DatePart(interval, date[, firstdayofweek[, firstweekofyear]])

It might have to do with firstdayofweek and/or firstweekofyear...

 
Old August 25th, 2003, 10:06 AM
Authorized User
 
Join Date: Jun 2003
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hello,

try also the

Code:
SetLocale("xx-yy")
statement.

hih
 
Old August 25th, 2003, 05:41 PM
Registered User
 
Join Date: Aug 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanx for the suggestion. i think the problem is with the server setting because it works fine in my computer (XP pro) and in another computer (win 2000). server is win 2000. do u mind to give some idea on it?

 
Old August 25th, 2003, 10:54 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 111
Thanks: 0
Thanked 0 Times in 0 Posts
Default

www.adopenstatic.com/faq/systemdateformat.asp

Or, as other's have suggested, you should set the LCID (Locale Identifier) in your ASP page, so that the correct date/time/currency/etc formats are used.

Cheers
Ken

www.adOpenStatic.com
 
Old August 31st, 2003, 04:17 AM
Registered User
 
Join Date: Aug 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hey ken!
thanx a lot mate. i had set LCID before as well but it wasn't working. but i follwed the instructions that was in the page from the link u provided and this time, when i used LCID, i worked. thanx a lot again. i have been waiting to solve this problem for long time.






Similar Threads
Thread Thread Starter Forum Replies Last Post
How to give Date format while entering date Subuana Beginning VB 6 4 March 17th, 2006 07:25 AM
Date based query when date is nvarchar MichaelTJ SQL Language 4 January 12th, 2004 09:57 PM
DTS Import ( Date string to Date field) gfowajuh SQL Server 2000 1 September 30th, 2003 06:28 AM
Convert String Date to Date for a SQL Query tdaustin Classic ASP Basics 4 July 7th, 2003 06:01 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.