I want to get the current date as a string in the following format:
\\/Date(1411762618805)\\/
I have been fighting with PowerShell and have trie
I know this is old but Google led me here. I'm using Invoke-RestMethod to send/receive JSON data, including timestamps in the /Date(1411704000000)/ format. I managed to convert from PowerShell to JSON using the following:
[System.DateTime]$(Get-Date).DateTime
Example:
@{DateTime = [System.DateTime]$(Get-Date).DateTime} | ConvertTo-Json
Returns:
{
"DateTime": "\/Date(1484023637000)\/"
}