Skip to content

Instantly share code, notes, and snippets.

Last active Nov 10, 2016
What would you like to do?
Date format (to be used with -format parameter of get-date)
for filename use : (Get-Date -Format yyy-MM-dd-HHmm)
Specifier;Format;Sample Output
D;LongDatePattern;Thursday, August 30, 2007
f;Full date and time (long date and short time);Thursday, August 30, 20
F;FullDateTimePattern (long date and long time);Thursday, August 30, 2007 11:19:59 AM
g;General (short date and short time);8/30/2007 11:20 AM
G;General (short date and long time);8/30/2007 11:20:24 AM
m, M;MonthDayPattern;August 30
o;Round-trip date/time pattern;[Text]
2007-08-30T11:18:49.0312500-07:00;RFC1123Pattern;Thu, 30 Aug 2007 11:21:36 GMT
s;SortableDateTimePattern (based on ISO 8601) using local time;2007-08-30T11:20:36
t;ShortTimePattern;11:20 AM
T;LongTimePattern;11:20:42 AM
u;UniversalSortableDateTimePattern using the format for universal time display;2007-08-30 11:21:50Z
U;Full date and time (long date and long time) using universal time;Thursday, August 30, 2007 6:21:52 PM
y, Y;YearMonthPattern;August, 2007
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment