I have a problem when I want to display a date with hours, minutes, seconds.
This is the way it looks now.
2005-7-16 12:14:6
but it should be 2005-07-16 12:14:06 instead.
How can I get the code to add a zero every time any of the numbers (month, date, hour, minute, second) is smaller than 10?
I use this code to display everything when the date is retrieved from my db.
Code:<%=Year(rs("reg_date"))%>-<%=Month(rs("reg_date"))%>-<%=Day(rs("reg_date"))%> <%=hour(rs("reg_date"))%>:<%=minute(rs("reg_date"))%>:<%=second(rs("reg_date"))%>


Reply With Quote
Bookmarks