Format script damaging string format
Posted: Tue Oct 03, 2017 6:33 pm
To help you better we need some information from you.
*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***
Product, version and build: PowerShell Studio 2017, 5.4.144
32 or 64 bit version of product: 64-bit
Operating system:
32 or 64 bit OS: 64-bit
*** Please add details and screenshots as needed below. ***
I have a line of code that the 'Format Script' breaks the formatting of a string. The following code will demonstrate the :
$TempDate = (New-Object System.DateTimeOffset((get-date)))
("$($TempDate.LocalDateTime.ToString('yyyy-MM-dd HH:mm:ss.fffffff')) $($TempDate.OffSet.Hours):$({00} -f $TempDate.OffSet.Minutes)" -replace " 0:00$", " -0:00")
Get's reformatted to:
$TempDate = (New-Object System.DateTimeOffset((get-date)))
("$($TempDate.LocalDateTime.ToString('yyyy-MM-dd HH:mm:ss.fffffff')) $($TempDate.OffSet.Hours):$({
00
} -f $TempDate.OffSet.Minutes)" -replace " 0:00$", " -0:00")
which breaks the return value.
DO NOT POST SUBSCRIPTIONS, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM
*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***
Product, version and build: PowerShell Studio 2017, 5.4.144
32 or 64 bit version of product: 64-bit
Operating system:
32 or 64 bit OS: 64-bit
*** Please add details and screenshots as needed below. ***
I have a line of code that the 'Format Script' breaks the formatting of a string. The following code will demonstrate the :
$TempDate = (New-Object System.DateTimeOffset((get-date)))
("$($TempDate.LocalDateTime.ToString('yyyy-MM-dd HH:mm:ss.fffffff')) $($TempDate.OffSet.Hours):$({00} -f $TempDate.OffSet.Minutes)" -replace " 0:00$", " -0:00")
Get's reformatted to:
$TempDate = (New-Object System.DateTimeOffset((get-date)))
("$($TempDate.LocalDateTime.ToString('yyyy-MM-dd HH:mm:ss.fffffff')) $($TempDate.OffSet.Hours):$({
00
} -f $TempDate.OffSet.Minutes)" -replace " 0:00$", " -0:00")
which breaks the return value.
DO NOT POST SUBSCRIPTIONS, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM