T
Thomas Scheiderich
I have the following page as test.aspx:
***************************************************
<html>
<head>
<title>Hello and Welcome Page</title>
</head>
<body>
<center>
<%
Dim CurrentDate As String
CurrentDate = Today
%>
The current date is <%=CurrentDate %>.<br>
</center>
</body>
</html>
***************************************************
If I have CurrentDate as String, like I do here, I get the following
page displayed:
The current date is 2/14/2004.
But if I take out the As String and have only "Dim CurrentDate", I get
the following result:
The current date is 2/14/2004 12:00:00 AM.
Why do I get the time for the Variant and not for the string? Why we
get different results, depending whether the resulting variable is a
String or Variant. I am assuming that the time is being truncated for
the String and not for the Variant. Why?
Thanks,
Tom.
***************************************************
<html>
<head>
<title>Hello and Welcome Page</title>
</head>
<body>
<center>
<%
Dim CurrentDate As String
CurrentDate = Today
%>
The current date is <%=CurrentDate %>.<br>
</center>
</body>
</html>
***************************************************
If I have CurrentDate as String, like I do here, I get the following
page displayed:
The current date is 2/14/2004.
But if I take out the As String and have only "Dim CurrentDate", I get
the following result:
The current date is 2/14/2004 12:00:00 AM.
Why do I get the time for the Variant and not for the string? Why we
get different results, depending whether the resulting variable is a
String or Variant. I am assuming that the time is being truncated for
the String and not for the Variant. Why?
Thanks,
Tom.