私は前の開発者のコードを作成しています。このコードにはSystemTimeが設定されています。 今日の日付とマイナス30日をこの形式で取得する方法はありますか?以下はVBA SystemTime - 30日
コード:
Public Function GetIsoTimestampTest() As String
Dim st As SYSTEMTIME
'Get the local date and time
GetSystemTime st
'Format the result
GetIsoTimestampTest = _
Format$(st.wYear, "0000") & "-" & _
Format$(st.wMonth, "00") & "-" & _
Format$(st.wDay, "00") & "T" & _
Format$(st.wHour, "00") & ":" & _
Format$(st.wMinute, "00") & ":" & _
Format$(st.wSecond, "00") & "Z"
End Function
アレックス、ありがとう、それは完璧に働いた! – Pang