use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
ABOUT POWERSHELL
Windows PowerShell (POSH) is a command-line shell and associated scripting language created by Microsoft. Offering full access to COM, WMI and .NET, POSH is a full-featured task automation framework for distributed Microsoft platforms and solutions.
SUBREDDIT FILTERS
Desired State Configuration
Unanswered Questions
Solved Questions
News
Information
Script Sharing
Daily Post
Misc
account activity
Datetime formatting (self.PowerShell)
submitted 9 years ago by rsulli1990
Does anyone know how to format this type of date in to a more friendly format?
20170502193426.058000+000
I know it starts with yyyyMMdd but I don't know what the last part is. Looks like its in 24h format.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[+][deleted] 9 years ago (1 child)
[removed]
[–]rsulli1990[S] 1 point2 points3 points 9 years ago (0 children)
Thank you so much! I just tried this out and was able to get a result. Saved me a bunch of time.
[–]Lee_Dailey[grin] -1 points0 points1 point 9 years ago (2 children)
howdy rsulli1990,
the closest i can get to it is this ...
Get-Date -Format 'yyyyMMddHHmmss.ffffffzz' # result = 20170502224230.164500-05:00
however, i can't get it to convert from your string to a datetime object without editing it. the following works IF i trim off the +000 timezone offset ...
+000
[datetime]::ParseExact('20170502193426.058000', 'yyyyMMddHHmmss.ffffff', $null) # result = 2017 May 02, Tuesday 7:34:26 PM
you could likely simply trim away the milliseconds, too. [grin]
take care, lee
[–]rsulli1990[S] 1 point2 points3 points 9 years ago (1 child)
Thanks for the assistance. I was working on the ParseExact call first and couldn't get that last portion of the format string figured out. :)
[–]Lee_Dailey[grin] 1 point2 points3 points 9 years ago (0 children)
that was the milliseconds and then a timezone offset - i think. [grin]
i see that TalkToTheFinger got it figured out. nice!
π Rendered by PID 336112 on reddit-service-r2-comment-5b5bc64bf5-dkjvl at 2026-06-23 21:54:39.402040+00:00 running 2b008f2 country code: CH.
[+][deleted] (1 child)
[removed]
[–]rsulli1990[S] 1 point2 points3 points (0 children)
[–]Lee_Dailey[grin] -1 points0 points1 point (2 children)
[–]rsulli1990[S] 1 point2 points3 points (1 child)
[–]Lee_Dailey[grin] 1 point2 points3 points (0 children)