Reading Text Database Dy Date

Results 1 to 2 of 2

Thread: Reading Text Database Dy Date

  1. #1
    Stacey Arnold Guest

    Default Reading Text Database Dy Date

    I have created a form that post two fields(date and message) to a TXT file database using commas as the seperator. I now need help reading the Dta into my asp page. I would like to use a If then To check and compare the date filed with the server date. If they match the the default header and the message will be displayed if the date matches. If the date does not match the It will leave a message "no new messages". If someone could help

  2. #2
    Join Date
    Dec 1969

    Default RE: Reading Text Database Dy Date

    Well, a .txt file isn&#039;t aware that it is holding a DATE field, normally. (You *might* be able to enclose the DATE values in #...# marks to coerce it to do so, but I&#039;ve never tried it.)<BR><BR>So the best you could do would be, when you read in the value (which will be a string), use the CDATE function to force its conversion to a date value. If you also use CDATE on the user&#039;s input value, then you will have two proper DATE values that you can compare.<BR><BR>But...<BR><BR>WHY???<BR><BR>Why are you using a text file???? If you used even a simple Access database, you&#039;d be able to do the date filtering right in your SQL statement! No checking in the VBS code needed!<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