11 replies
by medievaldude
Try something like this:
Dim strMyDate
Dim strMyFormattedDate
strMyDate = rs("myDateField")
strMyFormattedDate = Mid(strMyDate, 5, 2) & "/" & Mid(strMyDate, 7, 2) & "/" & Left(strMyDate, 4)
At this point, strMyFormattedDate should appear as "05/04/2001" for the given example you provided.
by vhansen86
by john_wills
by vhansen86
by john_wills
by vhansen86
by timfox
If SQL's result is known to be a date, then I would have thought...
Public Function ChangeDate (dteOldDate as date) as Date
ChangeDate = format("dd/mm/yyyy")
End Function
...would have worked.
by vhansen86
by andrew
try:
declare @d varchar(8)
set @d = '20010504'
select convert(char(10),cast(@d as datetime),101)
by vhansen86
by vhansen86
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending