[thelist] ASP: getting double digits

Tab Alleman talleman at avweb.com
Thu, 20 Jan 2000 21:48:16 -0000


I have an ASP script that needs to create a Date-Time string like this:

YYYYMMDDhhmmss

I'm using Year() Month() etc, to get the data, and then concatenating them
all into one string, but the problem is that whenever the day, month, hour,
etc is a single digit, those functions always return single digit values.

So for instance, if Now() is 01/19/00 15:00:00, how can I turn that into a
string like this:

20000119150000

instead of like this:

20001191500

?