Friday, May 1, 2009

Get Current System Time

 Function getCurrTime() As DateTime
        CmdDA.SelectCommand.CommandType = CommandType.Text
        CmdDA.SelectCommand.CommandText = "select getdate()"
        CmdDA.SelectCommand.Transaction = trans
        CmdDA.Fill(ds, "getdate1")
        If (ds.Tables("getdate1").Rows.Count > 0) Then
            gDate_dmy = ds.Tables("getdate1").Rows(0).Item(0)
        End If
        ds.Tables("getdate1").Clear()
        Return gDate_dmy
 End Function

No comments:

Post a Comment