Results 1 to 2 of 2

Thread: Conversion

  1. #1
    Jenny Guest

    Default Conversion

    Please can you tell me how to convert a query string to datetime format. I have tried CDate but when I use that it writes 1 Jan 1900 to the database instead of the one written on the reservation web form<BR>Cheers <BR>Jenny

  2. #2
    Join Date
    Dec 1969

    Default RE: Conversion

    Jen,<BR><BR>It would be useful if we could see a sample of the code - could you post it, or mail it to me.<BR><BR>The reason I say this is that if the date/time being stored in the database if 1900/01/01, then this usually means that nothing is being sent to the database (In SQL Server (and several over DBMS&#039s), if you don&#039t specify a date for a not-nullable datetime field, it defaults to 1900/01/01 - this is due to it&#039s method of data storage, but I won&#039t go in to that here!!!!!). <BR><BR>If you are not getting a data type coversion error on the CDate, then the chances are that the conversion is working OK, or that you are not actually passing anything to the CDate function, or that you are not passing the result of the CDate function to the database....In short, show us the code!!!<BR><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