Date formating trouble with access DB - newbie

Results 1 to 2 of 2

Thread: Date formating trouble with access DB - newbie

  1. #1
    Join Date
    Dec 1969

    Default Date formating trouble with access DB - newbie

    Hi <BR><BR>I have problem wiith writing / retrieving dates from our access DB on our web site. Our web host has their region set to English US with date format MM/DD/YYYY. We use region English UK with date format DD/MM/YYYY so when we write anything to the DB the dates are the wrong way around. This messes things up badly. The host will not reconfigure the region setting on their server as it messes up their web based control panel. <BR><BR>Our web pages are coded in asp so can I force the date to always be written in DD/MM/YYYY format by the asp code in our web pages. I am not really sure this is an ASP thing, HTML thing or should be fixed in theDB. <BR><BR>I have pasted the code where we write the date. <BR>&#060;td&#062;&#060;input name="InsertDate" type="text" value="&#060;%=now()%&#062;" size="32" readonly="true"&#062;&#060;/td&#062; <BR><BR>If I change our PC&#039;s region to US then dates write correctly. I would like it to be independant of the region as our visitors may all use different regions. <BR><BR>Thanks in advance <BR><BR>Gabs

  2. #2
    Join Date
    Dec 1969

    Default RE: Date formating trouble with access DB - newbie

    Then you need to insert your dates in ISO standard<BR><BR>YYYY-MM-DD -- Access is able to accept input this way<BR><BR>Also on pages where you are Collecting the Date might be best to specify with dropdowns <BR><BR>Day (1-31)<BR>Month (Jan - Dec)<BR>Year -- this can be blank<BR><BR>Display is another factor<BR><BR>So from a recordset<BR><BR>&#060;%=Day(rs("dates"))%&#062; &#060;%=MonthName(Month(rs("dates")), true)%&#062; &#060;%=Year(rs("dates"))%&#062;<BR><BR>Would return for today 05 Dec 2003<BR><BR>Hope this helps

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts