So my question is: How can I convert the date time to a string, if I only
want the hours to show?
Thanks -
--
-Jimmy
Used-Disks:
http://www.used-disks.com/
This is actually by design. For details read the Standard DateTime Format
Strings & Custom DateTime Format Strings.
A single character is interpreted as a Standard DataTime format, "H" & "h"
are not standard DateTime format strings. Hence those two cause exceptions.
A Custom DateTime format needs to be at least 2 characters.
Under VS.NET 2003 (.Net 1.1) "HH" & "hh" do not cause exceptions.
If you want just the hour, why not use the Hours property, then format that?
Dim d As DateTime
Dim s As String = d.Hour.ToString()
Of course you will get a 24 hour hour.
Hope this helps
Jay
"Jimmy [Used-Disks]" <noe...@used-disks.com> wrote in message
news:enGIOgyc...@TK2MSFTNGP11.phx.gbl...
--
-Jimmy Tharpe
http://www.aps-soft.com