DD/MM/YYYY format

Results 1 to 4 of 4

Thread: DD/MM/YYYY format

  1. #1
    Ryne Guest

    Default DD/MM/YYYY format

    I would like to store a date data type with DD/MM/YYYY format and also view it with the same format. But the problem came since everytime I store it using Insert/Update SQL statement, it will flip the day and month.<BR>For example :<BR>strDate = "05/10/1999" --&#062; October 5,1999<BR>SQL statement : "INSERT INTO table values(&#039"&strDate&"&#039)"<BR>But as I open the database (Access) it will contain 10/05/1999 (May 10,1999). <BR>Same thing happens when I want to retrieve data by SELECT statement.<BR>I have already change the Regional Settings on my NT Server into my region with DD/MM/YYYY date format and also Restart the server but no effect at all.<BR>I wonder where the problem is, in IIS, Access, NT or where ?<BR>FYI, the problem didn&#039t came up when I used PWS on Windows 98.<BR>Thanks a lot ....

  2. #2
    Join Date
    Dec 1969

    Default RE: DD/MM/YYYY format

    Have you tried using the FormatDateTime Function?<BR><BR>I think the syntax you are looking for is FormatDateTime(variable, 1)???<BR><BR><BR>HTH<BR><BR>Jerry

  3. #3
    Kadenz Guest

    Default RE: DD/MM/YYYY format

    I believe as long as you set the format of that ACCESS date field properly it should work fine (eg, set to dd/MM/yyyy). When you display the data, FormatDateTime(&#060;string&#062;, &#060;format&#062;) should work, but my experience is that IIS is quite flaky about this. For example, I wanted all short dates to be displayed as MM/dd/yy. It should display, eg 03/22/00. But sometimes it will show 3/22/00 instead. It&#039s really frustrating. So eventually I had to write a subroutine instead to fix the date format in order to give it a nicer look.

  4. #4
    Ryne Guest

    Default RE: DD/MM/YYYY format - thanks

    Thanks for all your advice ...

Posting Permissions

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