Rahlan

I have a slight problem. A program I'm piecing together to add so any hours to the time so I can see the difference (it's for checking time zones) keeps showing 12/31/1899 with the time when the added hours tip the clock over midnight. I have found that specifying the date removes this problem, but I don't want to see the date. Is there a way to specify the date, but also have it so it does not show up

Re: Visual Basic IDE Making Date Invisible

Spidermans_DarkSide - VSIP

Hi,

Code Snippet

Dim myDate As Date = Now()

Dim currentTime As String = myDate.ToLongTimeString

'Show the TIME portion of the date.

MessageBox.Show(currentTime)

'or use

Dim currentTime2 As String = myDate.ToShortTimeString

'the date & time are still held in the myDate variable.

'Show the TIME portion of the date.

MessageBox.Show(currentTime2)

Regards,

S_DS






Re: Visual Basic IDE Making Date Invisible

Rahlan

It was quite helpful, thank you.