T
Trint Smith
Ok, the 'SecondDate' comes from sql server, but I wanted to make it
visible here...but no matter what day I get in SecondDate, it comes up
one day off every time...the hours minutes and seconds are right:
Dim SecondDate As Date = "2/28/04 10:50:00 PM"
Dim FirstDate As Date
FirstDate = CDate(SecondDate)
Dim secs As Long = DateDiff(DateInterval.Second, Now,
SecondDate)
Dim dt As New DateTime(secs * 10000000D)
Dim dte As StreamWriter
dte = New StreamWriter("D:\datetimetest.txt", True)
dte.WriteLine(dt.ToString("dd HH:mm:ss"))
dte.Close()
Response.Write(dt.ToString("dd HH:mm:ss"))
Any help is greatly appreciated.
Thanks,
Trint
..Net programmer
(e-mail address removed)
visible here...but no matter what day I get in SecondDate, it comes up
one day off every time...the hours minutes and seconds are right:
Dim SecondDate As Date = "2/28/04 10:50:00 PM"
Dim FirstDate As Date
FirstDate = CDate(SecondDate)
Dim secs As Long = DateDiff(DateInterval.Second, Now,
SecondDate)
Dim dt As New DateTime(secs * 10000000D)
Dim dte As StreamWriter
dte = New StreamWriter("D:\datetimetest.txt", True)
dte.WriteLine(dt.ToString("dd HH:mm:ss"))
dte.Close()
Response.Write(dt.ToString("dd HH:mm:ss"))
Any help is greatly appreciated.
Thanks,
Trint
..Net programmer
(e-mail address removed)