0

Hi I am trying to create common reporting in .csv files on previously created users and new users. I am however seem to be having issues with my formatting: January is now the 47th month!

> $user.WhenCreated | Get-date

10 January 2012 16:47:49

> $user.WhenCreated | Get-date -Format  dd-mm-yyyy-hhmm

10-47-2012-0447 # What!!!!!!!!!!!!!!!!!!!!

I think I am muddling up my months and minutes? I am fairly flexible on the formatting as long it UK in presentation.

2

mm is minutes, you want MM.

$user.WhenCreated | Get-date -Format dd-MM-yyyy-hhmm

https://technet.microsoft.com/en-us/library/ee692801.aspx

  • 1
    @westerdaled, please don't forget to mark this as an answer if it helped you. – Mohamed Derhalli Dec 5 '16 at 15:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.