Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - UK/US Access Date headache
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

UK/US Access Date headache

 Post Reply Post Reply Page  12>
Author
redk View Drop Down
Groupie
Groupie


Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 48
Post Options Post Options   Thanks (0) Thanks(0)   Quote redk Quote  Post ReplyReply Direct Link To This Post Topic: UK/US Access Date headache
    Posted: 16 August 2003 at 3:47pm

Im afraid its good old Date format and Access again folks (sorry)

Im making a list of league fixtures and coming across problems when updating individual fixtures because of the way that the form textfield reads in and updates the date.

When im entering a fixture from scratch, i can write '10 Jun 03' in the date textfield and sure enough, it will show on my asp page as '10/06/03' - and thats cool - great.

But when i need to update that fixture (like, to put in the score), I read in the details and in the date box, it reads '10/06/03' (which you would still think is ok BUT, when i update it this time, it goes in as '06/10/03' US style -aaarrrgghhh!!! - Its doing my head in!
(incidentally, at this point, should i have to update it again, it would read it in as '06/10/03' this time and when entered again, it would sort itself back to the correct intended '10/06/03')

Ive scoured the net for a solution to fit but, cant find one (there are loads of solutions if the date is simply "Now()" but, its not! in this instance :(

Other solutions ive tried are the LCID route but, that didn't work either! I was ready for making the field text only but, i cant coz i need the entire fixture list to be sorted by date aaarrrggghhh!

Please help

thanks

RedK

Back to Top
b_bonnett View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 16 April 2003
Location: New Zealand
Status: Offline
Points: 275
Post Options Post Options   Thanks (0) Thanks(0)   Quote b_bonnett Quote  Post ReplyReply Direct Link To This Post Posted: 19 August 2003 at 4:52am

I think that there is an option within Access for the date format when you create the field. Its weird that it changes each time you update though. I would have thought that if you set the LCID correctly and used the FormatDateTime function then it should turn out fine... .

Blair

Webmaster, The Plane Gallery
Greetings From Christchurch
Back to Top
redk View Drop Down
Groupie
Groupie


Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 48
Post Options Post Options   Thanks (0) Thanks(0)   Quote redk Quote  Post ReplyReply Direct Link To This Post Posted: 19 August 2003 at 6:30am

Thanks for replying :)

Changing the format within Access is irrelevant as it simply stores the date as a number anyway (days since 01/01/1899 or similar) So the date in access is like "36457" for 10th June 03 kinda thing no matter whether you want it as 10/06/03 or 06/10/03 - Access will have it as 36457!

The LCID is definitely set correctly - Ive got it in global.asa AND in each file just to be sure :(

Anyone any other ideas please?

thanks

Red..

Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 19 August 2003 at 11:31am

When you say "entering a fixture from scratch" -  are you directly editing the db through ms access, or adding a new entry through a web form?

You've got three factors to synchronize...

  1. Codepage of server
  2. Codepage of client pc
  3. Charset specified by metatag on each of the web pages

You may also want to check out...

  • response.codepage
  • server.codepage
  • post.codepage

Lead me not into temptation... I know the short cut, follow me.
Back to Top
redk View Drop Down
Groupie
Groupie


Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 48
Post Options Post Options   Thanks (0) Thanks(0)   Quote redk Quote  Post ReplyReply Direct Link To This Post Posted: 19 August 2003 at 11:51am

Yes - Im entering it through a web form.

e.g - I enter 09/Aug/03 into the form and it goes into Access as 09/08/03 - thats great. When i try to update this fixture (through another webform) it firstly, reads its value back in as 09/08/03 (instead of 09/Aug/03) and this is where my problem is. Because this time, when i enter it, (and dont ammend it) it goes in as 08/09/03 automatically - see whats happening now?

Its driving me nuts my friend - any help most appreciated :)

Red..

Back to Top
b_bonnett View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 16 April 2003
Location: New Zealand
Status: Offline
Points: 275
Post Options Post Options   Thanks (0) Thanks(0)   Quote b_bonnett Quote  Post ReplyReply Direct Link To This Post Posted: 20 August 2003 at 4:19am

Question time: If you originally insert it in US format, does it still change each time you update it?

Blair

Webmaster, The Plane Gallery
Greetings From Christchurch
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 20 August 2003 at 6:06pm

I think I'd hit it the hard way...

in the meta tags for the new and the update pages, specify the charset

Use the corresdponding codepage (server.codepage=) in the asp page for the new and update pages, and in the formhandler pages for each one.

If it doesn't work, I'm going back under my rock.


Lead me not into temptation... I know the short cut, follow me.
Back to Top
Bunce View Drop Down
Senior Member
Senior Member
Avatar

Joined: 10 April 2002
Location: Australia
Status: Offline
Points: 846
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bunce Quote  Post ReplyReply Direct Link To This Post Posted: 21 August 2003 at 3:54am

Best bet is to use a generic date formatting routine used going IN and OUT of the database.. and format your dates internally using ISO format..

http://adopenstatic.com/faq/DateswithAccess.asp
http://adopenstatic.com/resources/code/formatdate.asp
http://adopenstatic.com/faq/systemdateformat.asp
http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q229/6/90.asp&NoWebContent=1

(got my name at the bottom of one of them!!  )

Cheers,
Andrew

There have been many, many posts made throughout the world...
This was one of them.
Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.