摘要:LoadDate, sSaveDate, sLoadDateTime, sDefaultTime
Public Sub LoadDate(ByVal psGlobalDate As String, ByVal pdtDate As DateTimePicker, ByVal pdtTime As DateTimePicker)
Try
If psGlobalDate <> BLANK Then
pdtDate.Value = FormatDate(psGlobalDate)
pdtTime.Value = FormatDateTime(psGlobalDate)
End If
Catch Err As Exception
Call ErrHandler(Err.Message, APP_NAME)
End Try
End Sub
Public Function sSaveDate(ByVal psGlobalDate As String, ByVal pdtDate As DateTimePicker, ByVal pdtTime As DateTimePicker) As String
Try
sSaveDate = FormatDate(pdtDate.Value) + " " + FormatTimeMin(pdtTime.Value)
Catch Err As Exception
Call ErrHandler(Err.Message, APP_NAME)
End Try
End Function
Private Function sLoadDateTime(ByVal psDate As String) As String
Try
sLoadDateTime = BLANK
If psDate = BLANK Then
sLoadDateTime = sDefaultTime()
Exit Function
End If
sLoadDateTime = FormatDateTime(psDate)
Catch Err As Exception
Call ErrHandler(Err.Message, APP_NAME)
End Try
End Function
Public Function sDefaultTime() As String
Try
sDefaultTime = FormatDate(Now) + " " + "00:00"
Catch Err As Exception
Call ErrHandler(Err.Message, APP_NAME)
End Try
End Function
------------------
熱愛生命 喜愛新奇 有趣的事物
過去 是無法改變
將來 卻能夠創造
希望使大家生活更便利
世界更美好
a guy who loves IT and life
Public