DateTime format year.month.day hour:minute:second (all with leading zeros) e.g.: 2013.05.24 07:30:04
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
PowerShell [System.DateTime]::Now.ToString("yyyy.MM.dd HH:mm:ss") Get-Date -Format "yyyy.MM.dd HH:mm:ss" RHEL date '+%Y.%m.%d %k:%M:%S' HP-UX date '+%Y.%m.%d %H:%M:%S' C# DateTime.Now.ToString("yyyy.MM.dd HH:mm:ss"); PHP date('Y.m.d H:i:s') VBS WScript.Echo ("yyyy",Now()) & "." & Right("0" & DatePart("m",Now()), 2) & "."_ & Right("0" & DatePart("d",Now()), 2)& " " & FormatDateTime(Now(), vbLongTime) |