Posted on 2011-09-29
Last Modified: 2012-05-12
Hi Experts,
How could I display today's date on my classic ASP page in the following format:
I'd appreciate your help.
Question by:baxtalo
LVL 15

Accepted Solution

pateljitu earned 500 total points
ID: 36819037
Please see this article:

   Function pd(n, totalDigits)
        if totalDigits > len(n) then
            pd = String(totalDigits-len(n),"0") & n
            pd = n
        end if
    End Function

    response.write YEAR(Date()) & _
        "-" & Pd(Month(date()),2) & _
        "-" & Pd(DAY(date()),2)

Author Closing Comment

ID: 36830455
Thank you very much

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Obtain data from database .mdb 4 30
send email part1 9 39
Use Mid in Html 6 21
Building JSON Results Table FROM DB 9 31
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: and…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

680 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question