asp time addition, subtraction and conversion problems asp time addition, subtraction and conversion problems
a=2007-07-24 2:23:15
b=2005-06-25 2:23:15
Question 1
How to convert a to 2007-07-24 in date format but not in character format!
Question 2
How to convert a to 2007 requires date format but not character format!
Question 3
How to convert a to 2:23:15 in date format but not in character format!
Question 4
Why does ab appear with a pair of numbers? Why not time? How could he let it turn out to be time?
Answer
Question 1:
FormatDateTime(a, 2)
Question 2:
Year(a)
Question 3:
FormatDateTime(a, 4)
Question 4:
DateDiff(d, a, b)'day
DateDiff(h, a, b)'
DateDiff(n, a, b)' points
DateDiff(s, a, b)' seconds