![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Date in standard format for locale This may seem trivial, but I'm just looking at powershell for the first time, and I appear to have a discrepency in my output. When I say discrepency, I mean I was expecting as stated in the help pages `Date in standard format for locale`. Here is my output with the latter representing what I was expecting to be the result of the second command. #-----start----- PS C:\WINDOWS\system32\windowspowershell\v1.0> get-date -uformat %D 02/15/07 PS C:\WINDOWS\system32\windowspowershell\v1.0> get-date -uformat %x 02/15/07 PS C:\WINDOWS\system32\windowspowershell\v1.0> get-date -uformat %d/%m/%y 15/02/07 #------end------ My Windows `Regional Settings` etc. are all set accordingly for United Kingdom defaults. Can anyone help, or is it a fact that the `%x` parameter doesn't work correctly. |
My System Specs![]() |
| | #2 (permalink) |
| | RE: Date in standard format for locale I get the same results. PS> $host Name : ConsoleHost Version : 1.0.0.0 InstanceId : 9f23fe23-99dc-4cdb-a83b-cbb23badea45 UI : System.Management.Automation.Internal.Host.InternalHostUserInterface CurrentCulture : en-GB CurrentUICulture : en-US PrivateData : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy using $host shows that the CurrentUICulture is set to US english which is why you get the date format of mm/dd/yy Need to dig a bit to see how to change it -- Richard Siddaway Please note that all scripts are supplied "as is" and with no warranty Blog: http://richardsiddaway.spaces.live.com/ PowerShell User Group: http://www.get-psuguk.org.uk "ten.nigriv@virgin.net" wrote: > This may seem trivial, but I'm just looking at powershell for the first > time, and I appear to have a discrepency in my output. When I say > discrepency, I mean I was expecting as stated in the help pages `Date in > standard format for locale`. > Here is my output with the latter representing what I was expecting to be > the result of the second command. > #-----start----- > PS C:\WINDOWS\system32\windowspowershell\v1.0> get-date -uformat %D > 02/15/07 > PS C:\WINDOWS\system32\windowspowershell\v1.0> get-date -uformat %x > 02/15/07 > PS C:\WINDOWS\system32\windowspowershell\v1.0> get-date -uformat %d/%m/%y > 15/02/07 > #------end------ > My Windows `Regional Settings` etc. are all set accordingly for United > Kingdom defaults. Can anyone help, or is it a fact that the `%x` parameter > doesn't work correctly. > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| HELP website will only display in mobile format not standard. | Browsers & Mail | |||
| changing windows date format | General Discussion | |||
| Date Format - Change | Tutorials | |||
| Converting date time format to string format | PowerShell | |||
| Date Format | Vista General | |||