www.webdeveloper.com
Results 1 to 2 of 2

Thread: Date format

  1. #1
    Join Date
    Apr 2006
    Posts
    20

    Date format

    Hi, I'm running the following query on my webpage.asp from my access database.

    Code:
    SELECT schedules.Date, schedules.Time, schedules.Show FROM schedules WHERE (((schedules.Date)=#" & SetDate & "#))
    The variable SetDate is in the following format DD/MM/YYYY

    When I run the query it translates this as M/D/YYYY thus bringing up the wrong date. i.e when SetDate = 02/05/2006 the query is

    Code:
    SELECT schedules.Date, schedules.Time, schedules.Show FROM schedules WHERE (((schedules.Date)=#5/2/2006#))
    How do I go about fixing this?

    Many thanks

  2. #2
    Join Date
    Apr 2006
    Posts
    20
    Fixed

    Code:
    DBDate = month(SetDate) & "/" & day(SetDate) & "/" & year(SetDate)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles