Date format problem

Results 1 to 2 of 2

Thread: Date format problem

  1. #1
    Join Date
    Dec 1969

    Default Date format problem

    I have a aspx file that takes a date and writes it to SQL Server. The format I need is dd-mm-yyyy, on my local machine this is fine, but on the server I get a database error, this because the server expects the format to be mm-dd-yyyy, so 22-04-2004 fails. How do I change this?<BR><BR>Thanks

  2. #2
    Join Date
    Dec 1969

    Default RE: Date format problem

    Several options, but the one that works best/easiest is to supply the date in yyyy/mm/dd format. SQL server will recognise this date always.<BR><BR>A second option involves the SET DATEFORMAT command of SQL Server. Take a look in Books Online on what this does, and how to use it.

Posting Permissions

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