add Get_ServerTime()

This commit is contained in:
ykh
2024-12-30 23:05:28 +09:00
parent 8f89991a09
commit dbea57dafa
2 changed files with 24 additions and 0 deletions

1
.gitignore vendored
View File

@@ -7,3 +7,4 @@ obj
/Setup1/Release
/Setup1/Debug
/Dotfuscated
UpgradeLog.htm

View File

@@ -135,6 +135,29 @@
Return Retval
End Function
Public Function Get_ServerTime() As String
Dim Cs As String = ReadCString()
Dim Cn As New SqlClient.SqlConnection(Cs)
Dim Cmd As New SqlClient.SqlCommand("SELECT convert(varchar(19), CURRENT_TIMESTAMP,120);", Cn)
Dim retval As String = ""
If Cn.State <> ConnectionState.Open Then Cn.Open()
retval = Cmd.ExecuteScalar().ToString()
Cmd.Dispose()
Cn.Close()
Return Retval
End Function
''' <summary>
''' 폴더내의 연결문자열 정보를 가지고 연결한다
''' </summary>