You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/templates/deployment-script-template.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -308,7 +308,7 @@ The life cycle of these resources is controlled by the following properties in t
308
308
309
309
Deployment script execution is an idempotent operation. If none of the deploymentScripts resource properties (including the inline script) is changed, the script will not be executed when you redeploy the template. The deployment script service compares the resource names in the template with the existing resources in the same resource group. There are two options if you want to execute the same deployment script multiple times:
310
310
311
-
- Change the name of your deploymentScripts resource. For example, use the [utcNow](./template-functions-string.md#utcnow) template function as the resource name or as a part of the resource name. Changing the resource name creates a new deploymentScripts resource. It is good for keeping a history of script execution.
311
+
- Change the name of your deploymentScripts resource. For example, use the [utcNow](./template-functions-date.md#utcnow) template function as the resource name or as a part of the resource name. Changing the resource name creates a new deploymentScripts resource. It is good for keeping a history of script execution.
312
312
313
313
> [!NOTE]
314
314
> The utcNow function can only be used in the default value for a parameter.
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/templates/template-functions-date.md
+58-4Lines changed: 58 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,9 @@ description: Describes the functions to use in an Azure Resource Manager templat
4
4
ms.topic: conceptual
5
5
ms.date: 04/06/2020
6
6
---
7
-
# String functions for ARM templates
7
+
# Date functions for ARM templates
8
8
9
-
Resource Manager provides the following functions for working with strings in your Azure Resource Manager (ARM) templates:
9
+
Resource Manager provides the following functions for working with dates in your Azure Resource Manager (ARM) templates:
10
10
11
11
*[dateTimeAdd](#datetimeadd)
12
12
*[utcNow](#utcnow)
@@ -21,8 +21,8 @@ Adds a time duration to a base datetime value.
21
21
22
22
| Parameter | Required | Type | Description |
23
23
|:--- |:--- |:--- |:--- |
24
-
| base | Yes | string ([ISO 8601 timestamp format](https://en.wikipedia.org/wiki/ISO_8601)) | The starting datetime value for the addition. |
25
-
| duration | Yes | string ([ISO 8601 duration format](https://en.wikipedia.org/wiki/ISO_8601#Durations)) | The time value to add to the base. It can be a negative value. |
24
+
| base | Yes | string | The starting datetime value for the addition. Use [ISO 8601 timestamp format](https://en.wikipedia.org/wiki/ISO_8601). |
25
+
| duration | Yes | string | The time value to add to the base. It can be a negative value. Use [ISO 8601 duration format](https://en.wikipedia.org/wiki/ISO_8601#Durations). |
26
26
| format | No | string | The output format for the date time result. If not provided, the format of the base value is used. Use either [standard format strings](https://docs.microsoft.com/dotnet/standard/base-types/standard-date-and-time-format-strings) or [custom format strings](https://docs.microsoft.com/dotnet/standard/base-types/custom-date-and-time-format-strings). |
27
27
28
28
### Return value
@@ -74,6 +74,60 @@ When the preceding template is deployed with a base time of `2020-04-07 14:53:14
74
74
| subtract9Days | String | 3/29/2020 2:53:14 PM |
75
75
| add1Hour | String | 4/7/2020 3:53:14 PM |
76
76
77
+
The next example template shows how to set the start time for an Automation schedule.
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/templates/template-functions-string.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1869,7 +1869,7 @@ The following example shows how to create a unique name for a storage account ba
1869
1869
...
1870
1870
```
1871
1871
1872
-
If you need to create a new unique name each time you deploy a template, and don't intend to update the resource, you can use the [utcNow](#utcnow) function with uniqueString. You could use this approach in a test environment. For an example, see [utcNow](#utcnow).
1872
+
If you need to create a new unique name each time you deploy a template, and don't intend to update the resource, you can use the [utcNow](template-functions-date.md#utcnow) function with uniqueString. You could use this approach in a test environment. For an example, see [utcNow](template-functions-date.md#utcnow).
0 commit comments