ASP I want to take time like 2009-8-4 16:03:04 in the number, but with the CStr function or other conversion is 2009841634, how can I make it into "200984160304"? It also shows two digits when the number is less than 10 in time.
<%
Str=now
Str=replace (str, "", "")
Str=replace (str, "-", "")
Str=replace (str, ":", "")
Str=replace (str, "a.m.", "")
Str=replace (str, "PM", "")
Response.Write Str
%>
'***************************************************
' Function name: Getyyyymmddhhiiss
' Function: Converts a given date and time data to a Yyyymmddhhiiss string format
' Parameters: D-Date data, T-time data
' return value: converted String
'***************************************************
Function Getyyyymmddhhiiss (d,t)
Yyyy=year (d)
Mm=month (d)
Dd=day (d)
Hh=hour (t)
Ii=minute (t)
Ss=second (t)
If Len (YYYY) =2 Then
yyyy= "& YYYY"
End If
If Len (MM) =1 Then
mm= "0" & MM
End If
If Len (DD) =1 Then
Dd= "0" & DD
End If
If Len (HH) =1 Then
Hh= "0" & HH
End If
If Len (II) =1 Then
Ii= "0" & II
End If
If Len (SS) =1 Then
ss= "0" & SS
End If
Getyyyymmddhhiiss=yyyy & MM & DD & HH & II & SS
End Function