...

View Full Version : ASP Calendar



QBall777
02-20-2007, 11:53 AM
Hi

I download an asp calendar for my local golf club, at first I had trouble getting the correct days of the start of each month ie

Jan 1st is on a Monday Feb 1st is on a Thursday

I corrected this problem by using this code <% Session.LCID = 2057 %>

The problem I am facing now is if I enter an event on 2nd March 07 the event is being displayed on 3rd Feb 07

As you can see the date format is being switched, I have looked at the code but I still can not figure out where to re format it.

If I zip the files up would someone be willing to have a look at this for me.

Many thanks

miranda
02-20-2007, 11:24 PM
Before you save the date of the event in the database do this



Response.Write "TheDateReturnedFromYourCalendar"
Response.End



is the date returned in the correct format?
If not make sure the LCID is on the page that saves the data in the db.
If it wasn't on there, add it and then try again,

QBall777
02-21-2007, 10:59 AM
Hi

When you add an event the date is formated the correct way.
The LCID is present on every page including the page that saves the data.

degsy
02-21-2007, 02:25 PM
You can construct your own date so that you know that you are submitting it in the correct format e.g (uk or us).

Sometimes to aviod confusion you can use a global date format such as
yyyy-m-d


Also, datebases have format functions to make sure that you are outputting the date in the correct format.
e.g. Format(dateField,'dd/mm/yyyy')

QBall777
02-22-2007, 03:12 PM
I tried formating the database field with your example but it made no difference. :(

miranda
02-22-2007, 04:39 PM
Did you do a response.write after you clicked on the date was it in the correct format?

QBall777
02-27-2007, 09:22 AM
Hi


I added an event in the admin section and then dowloaded the db the date had been switched to US format in the database, so it is changing format before it reaches the db, I think.

QBall777
02-27-2007, 10:04 AM
If I add this in the admin section I get the correct LCID <%= getLocale() %> 2057



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum