Anybody fancy a DATE...???

Results 1 to 2 of 2

Thread: Anybody fancy a DATE...???

  1. #1
    Join Date
    Dec 1969

    Default Anybody fancy a DATE...???

    I am having a problem with date formats in SQL Server and ASP<BR>The ASP is the Local format, which is mm/dd/yy<BR>The SQL &#039Date&#039 type is in the format of dd/mm/yy<BR><BR>Using SQL:<BR><BR>SELECT * FROM Orders WHERE Orders.OrderDate = &#039Date()&#039<BR><BR>I have tried changing the local format to mm/dd/yy but I need the ASP date to be in the format mm/dd/yy.<BR>Is there anyway of changing the format of the SQL date variable, before I empty the waste paper bin on my head.

  2. #2
    Neil Popham Guest

    Default RE: Anybody fancy a DATE...???

    cool name for a thread :o)<BR><BR>i usually (being from the UK) use the FormatDateTime function to convert dates to Long Format before I use them, so there&#039s no cunfusion.<BR><BR>therefore:<BR><BR>"SELECT * FROM Orders WHERE Orders.OrderDate = #" & FormatDateTime(Date(), vbLongDate) & "#"<BR>

Posting Permissions

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