Europian date/time format in PowerShell

Hello! Please help :-) - need to execute Get-MessageTrackingLog command but it understands AM/PM date/time format only. For example,

Get-messagetrackingLog -Start "7/14/2015 09:00 PM" -End "7/14/2015 10:00 PM" -Recipients "user@company.com" |Where {$_.eventid -eq "SEND"}| Select {$_.Sender},{$_.Recipients},{$_.TimeStamp},{$_.eventID}

How can I use Europian date/time format? I need this command should looks like:

Get-messagetrackingLog -Start "14/7/2015 21:00" -End "14/7/2015 22:00" -Recipients "user@company.com" |Where {$_.eventid -eq "SEND"}| Select {$_.Sender},{$_.Recipients},{$_.TimeStamp},{$_.eventID}

Thank you :-)


  • Edited by 16 hours 33 minutes ago
July 16th, 2015 10:57am

Try changing the date format in Date and Time Settings, Not sure it will work, but can give a try
Free Windows Admin Tool Kit Click here and download it now
July 16th, 2015 11:10am

It depends on regional setting of your computer....

Start

Optional

System.DateTime

The Start parameter specifies the start date and time of the date range.

Use the short date format defined in the Regional Options settings for the computer on which the command is run. For example, if the computer is configured to use the short date format mm/dd/yyyy, enter 03/01/2010 to specify March 1, 2010. You can enter the date only, or you can enter the date and time of day. If you enter the date and time of day, you must enclose the argument in quotation marks ("), for example, "10/05/2010 5:00 PM".

Get-MessageTrackingLog - https://technet.microsoft.com/en-us/library/aa997573%28v=exchg.150%29.aspx?f=255&MSPPError=-2147217396

July 16th, 2015 7:51pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics