Book now with code EOY2025
tiersten wrote: » $DateStr = '{0:yyyyMMdd}' -f $Date
mikedisd2 wrote: » EDIT: But this did work for converting a standard Get-Date format. Ended up doing it ways: $Date = 25/01/2011 $str = [regex]::Replace($Date, "(\w)(\w)(/)(\w)(\w)(/)(\w)(\w)(\w)(\w)", '$7$8$9$10$4$5$1$2')And $date = get-date $date Wednesday, 2 February 2011 12:10:25 PM $a = '{0:yyyyMMdd}' -f $date $a 20110202 Thanks for the help
Use code EOY2025 to receive $250 off your 2025 certification boot camp!