---
title: "$DateUtc"
---
Returns the current UTC date and time in the specified .NET datetime format string, or ISO 8601 format (yyyy-MM-ddTHH:mm:ss) if no format is specified.
$DateUtc([Format])
Name | Description |
---|---|
Format | An optional .NET datetime format string. |
# format strings taken from https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx
set $OtterScript = >>
Now: $Date
UTC Now: $DateUtc
Custom: $Date(hh:mm:ss.f)
RFC1123: $Date(r)
Sortable: $Date(s)
Short time: $Date(t)
>>;
set $Result = $Eval($OtterScript);
Log-Information $Result;