Use ${__time(yyyy-MM-dd'T'hh:mm:ss)}
to convert time into a particular timeformat.
Here are other formats that you can use:
yyyy/MM/dd HH:mm:ss.SSS
yyyy/MM/dd HH:mm:ss
yyyy-MM-dd HH:mm:ss.SSS
yyyy-MM-dd HH:mm:ss
MM/dd/yy HH:mm:ss
You can use Z character to get milliseconds too. For example:
yyyy/MM/dd HH:mm:ssZ => 2017-01-25T10:29:00-0700
yyyy/MM/dd HH:mm:ss.SSS'Z' => 2017-01-25T10:28:49.549Z
Most of the time yyyy/MM/dd HH:mm:ss.SSS'Z'
is required in some APIs. It is better to know how to convert time into this format.