-
date issue...
i am inserting a date from my form into my database (enterprise manager).
it is in the form:
07/22/2005
i gave the field a datatype of smalldatetime.
i am calling it to a page, and it returns as:
07/22/2005
I am trying to format it so that it is in this form:
Friday, July 22, 2005
I have a similar thing on my page, i use the same function:
FormatDateTime(rs("time"),1)
and it works fine, but not for the july date.
The July date doesn't have a time associated with it (the 07/22/2005 comes from a calendar popup).
How can I format 07/22/2005 so that it appears as Friday, July 22, 2005 ?
Thanks all!
-
The FormatDateTime function will work for dates aswell as times.
Code:
Dim dtrYourDate
If IsDate(yourDate) Then
dteYourDate = FormatDateTime(yourDateHere, 1)
Else
dteYourDate = FormatDateTime(Date, 1)
End If
Regards.
-
 Originally Posted by buntine
The FormatDateTime function will work for dates aswell as times.
Code:
Dim dtrYourDate
If IsDate(yourDate) Then
dteYourDate = FormatDateTime(yourDateHere, 1)
Else
dteYourDate = FormatDateTime(Date, 1)
End If
Regards.
thanks!
i realize that the problem i am having has to do when the database returns a null for date.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
|
Bookmarks