Today's Date

Results 1 to 2 of 2

Thread: Today's Date

  1. #1
    Join Date
    Dec 1969

    Default Today's Date

    How do I display Today's Date in this format DD-MM-YYYY?

  2. #2
    Join Date
    Dec 1969

    Default RE: Today's Date

    you could write a function...but I guess the easiest way is to use the locale id (LCID).<BR>Locale Ids are (usually) country relative codes. Most countries display dates in a different format, and I wouldn&#039;t be surprised if you find a LCID that displays dates in that format. You can find (I think all of them) at the following url. <BR><BR><BR>LCIDs are used this way at the top of your page.<BR><BR>&#060;%@ Language = VBScript LCID=1036 %&#062;<BR>The following code states that Dates and currencies will be returned using the French format. I would try the codes on that page and see if you find the format you are looking for.<BR><BR>However, if you prefear to use a function, place the date value in an array<BR>--------------------<BR>Dim aDate<BR>Dim strNewDate<BR><BR>aDate = Split(Date(), "/")<BR>strNewDate = aDate(0) & "-" & aDate(1) & "-" & aDate(2)<BR>Response.Write(strNewDate)<BR>---------------------------<BR>you may need to invert the days with months depending on the format your server is using. Ex <BR>strNewDate = aDate(1) & "-" & aDate(0) & "-" aDate(2)<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