Date function

Results 1 to 2 of 2

Thread: Date function

  1. #1
    Mirch Guest

    Default Date function

    I am using Vbscript to get the current date and I am using the function date() which gives me the date in this format:4/14/00<BR><BR>Is there a function that gives me the date in 04/14/2000 format.

  2. #2
    Join Date
    Dec 1969

    Default RE: Date function

    Don&#039t know if this is an option, but if you change the short date display setting on the web server to mm/dd/yyyy, you will get what you are after.<BR><BR>If Not, you could obtain the values and pad them, then concatenate them back together...<BR><BR>myMonth = Month(Date())<BR>myDay = Day(Date())<BR>myYear = Year(Date()) &#039 This will provide a 4 digit year<BR><BR>Then all you have to do is left pad the month and day variables, if their lengths are less than 2, and then concatenate them back together.<BR><BR><BR>HTH<BR><BR>Jerry<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