
Formatting Column in List View
No matter how I try to manipulate the code, the date
format is coming in as "10/02/2002 10:00:00 PM"
What can I do to format a simple column? Even if I make
it a string cutting out the extra into ie "10/02/02"
it still comes in incorrectly. Help!
If IsDBNull(.Item("author_time")) Then
lv.Items(i).SubItems.Add("")
Else
Dim c As Date
Dim s As String
's = Microsoft.VisualBasic.Left(.Item
("author_date"), 6)
's = s & Microsoft.VisualBasic.Right(.Item
("author_date"), 2)
s = FormatDateTime(.Item("author_date"),
DateFormat.ShortDate) & " " & .Item("author_time")
c = CDate(s)
'c = .Item("author_date") & " " & .Item
("author_time")
'c = (Format(c, "M/dd/yy H:mm"))
lv.Items(i).SubItems.Add(c)
' lv.Items(i).SubItems.Add(.Item
("author_date") & " " & (Format(.Item
("author_time"), "MM/dd/YY HH:mm")))
End If