Results 1 to 2 of 2

Thread: Writing out Date from database

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Location
    Ireland
    Posts
    224

    Red face

    Hi All,

    I have an ASP page that pulls a ValueDate from a SQL Server Database and write it out to my web page. The date on the SQL server looks like this DD/MM/YY(e.g 16/01/2001). However when I call this value from the database it is written out to my page in this format Tuesday Jan 16 00:00: 00 UTC 2001. Can someone please tell me why this is happening and how I can adjust this to be displayed as YY/MM/DD.

    Your help is really appreciated

    JK

  2. #2
    Lively Member
    Join Date
    Jul 2000
    Posts
    94

    Smile Format it?

    Using the FormatDateTime function will return the data in its short (dd/mm/yy) format.

    FormatDateTime(date,2)

    Try that or some variation of 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
  •  



Click Here to Expand Forum to Full Width