Please help!!! date-format

Results 1 to 2 of 2

Thread: Please help!!! date-format

  1. #1
    Join Date
    Dec 1969

    Default Please help!!! date-format

    I&#039m at a loss for the code I&#039m looking for. I&#039m trying to allow the user to input a date field as 01/01/01 or 01/01/2001, but when the info is viewed on another page I want the appearance to be 01/01/2001. I&#039ve tried --<BR>&#060;%=Ucase(format(rs("DateInstalled"), "dd-mmm-yyyy"))%&#062;"&#062; <BR>&#060;%=Ucase(format(Cstr(rs("DateInstalled")) , "dd-mmm-yyyy"))%&#062;"&#062;<BR><BR>but I get a type mismatch error. Using the first one I get----<BR>Type mismatch: &#039format&#039 <BR><BR>using the second one I also get ----<BR>Type mismatch: &#039format&#039 <BR><BR>How do I write the code. Thanks for looking!!<BR>

  2. #2
    Join Date
    Dec 1969

    Default Brain Fart!!!

    Just thought of something...<BR><BR>I don&#039t know that Format is a valid function in VBSCRIPT. Just after looking over the documentation on Microsoft, I don&#039t see it listed as a valid function. Have you tried to using FormatDateTime(rs("DateInstalled"), 2)? This will give you the short date format that the web server is set to.<BR><BR>Would someone correct me if I am wrong about Format, but I don&#039t see it in my documentation or Microsofts&#039. Probably too many years of VB developmen before switching over.<BR><BR>HTH & TIA<BR><BR>Jerry

Posting Permissions

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