--- title: "datetime() submacro" slug: "datetime-submacro" updated: 2023-01-06T15:49:51Z published: 2023-01-06T15:49:51Z canonical: "docs.catchpoint.com/datetime-submacro" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.catchpoint.com/llms.txt > Use this file to discover all available pages before exploring further. # datetime() submacro Alert webhook macros like **alertProcessingTimestampUTC** and **alertCreateDateLocal** returns the date and time in a concatenated format like `20170412105408131`. This may not not be easy/friendly to read. In order to format the date and time in a more readable way, we can make use of `datetime()` sub-macro. For example: ``` { "alertProcessingTimestampUTC": "${alertProcessingTimestampUTC}", "alertCreateDateLocal": "${alertCreateDateLocal}", } ``` This JSON template without the datetime macro gives the output as shown below. ![](https://cdn.document360.io/cb4af8f9-6751-4fd2-b39c-07aae832badb/Images/Documentation/360010982592-mceclip1.png) Now, if we use the datetime macro like the example given below, we get the date and time in a more readable format. ``` { "alertProcessingTimestampUTC": "${alertProcessingTimestampUTC(datetime(yyyy-MM-ddHH:mm:ss))}", "AlertCreateDateLocal": "${AlertCreateDateLocal(datetime(yyyy-MM-dd HH:mm:ss))}" } ``` ![](https://cdn.document360.io/cb4af8f9-6751-4fd2-b39c-07aae832badb/Images/Documentation/360011798792-mceclip0.png)