Skip to content

Commit 842285f

Browse files
authored
Merge pull request #103453 from cmmdesai/cmmdesai-2-5-2020
Added NumFromDate function
2 parents 2542b25 + aefcc14 commit 842285f

File tree

1 file changed

+27
-3
lines changed

1 file changed

+27
-3
lines changed

articles/active-directory/manage-apps/functions-for-customizing-application-data.md

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ms.workload: identity
1111
ms.tgt_pltfrm: na
1212
ms.devlang: na
1313
ms.topic: conceptual
14-
ms.date: 07/31/2019
14+
ms.date: 02/05/2020
1515
ms.author: mimart
1616

1717
ms.collection: M365-identity-device-management
@@ -34,7 +34,7 @@ The syntax for Expressions for Attribute Mappings is reminiscent of Visual Basic
3434
* For string constants, if you need a backslash ( \ ) or quotation mark ( " ) in the string, it must be escaped with the backslash ( \ ) symbol. For example: "Company name: \\"Contoso\\""
3535

3636
## List of Functions
37-
[Append](#append)      [BitAnd](#bitand)      [CBool](#cbool)      [Coalesce](#coalesce)      [ConvertToBase64](#converttobase64)      [ConvertToUTF8Hex](#converttoutf8hex)      [Count](#count)      [CStr](#cstr)      [DateFromNum](#datefromnum)  [FormatDateTime](#formatdatetime)      [Guid](#guid)      [InStr](#instr)      [IsNull](#isnull)      [IsNullOrEmpty](#isnullorempty)      [IsPresent](#ispresent)      [IsString](#isstring)      [Item](#item)      [Join](#join)      [Left](#left)      [Mid](#mid)         [NormalizeDiacritics](#normalizediacritics) [Not](#not)      [RemoveDuplicates](#removeduplicates)      [Replace](#replace)      [SelectUniqueValue](#selectuniquevalue)     [SingleAppRoleAssignment](#singleapproleassignment)     [Split](#split)    [StripSpaces](#stripspaces)      [Switch](#switch)     [ToLower](#tolower)     [ToUpper](#toupper)     [Word](#word)
37+
[Append](#append)      [BitAnd](#bitand)      [CBool](#cbool)      [Coalesce](#coalesce)      [ConvertToBase64](#converttobase64)      [ConvertToUTF8Hex](#converttoutf8hex)      [Count](#count)      [CStr](#cstr)      [DateFromNum](#datefromnum)  [FormatDateTime](#formatdatetime)      [Guid](#guid)      [InStr](#instr)      [IsNull](#isnull)      [IsNullOrEmpty](#isnullorempty)      [IsPresent](#ispresent)      [IsString](#isstring)      [Item](#item)      [Join](#join)      [Left](#left)      [Mid](#mid)         [NormalizeDiacritics](#normalizediacritics) [Not](#not)      [NumFromDate](#numfromdate)     [RemoveDuplicates](#removeduplicates)      [Replace](#replace)      [SelectUniqueValue](#selectuniquevalue)     [SingleAppRoleAssignment](#singleapproleassignment)     [Split](#split)    [StripSpaces](#stripspaces)      [Switch](#switch)     [ToLower](#tolower)     [ToUpper](#toupper)     [Word](#word)
3838

3939
---
4040
### Append
@@ -283,7 +283,7 @@ Returns True if the attribute is not present or is an empty string
283283
---
284284
### IsPresent
285285
**Function:**<br>
286-
IsNullOrEmpty(Expression)
286+
IsPresent(Expression)
287287

288288
**Description:**<br>
289289
If the expression evaluates to a string that is not Null and is not empty, then the IsPresent function returns true. The inverse of this function is named IsNullOrEmpty.
@@ -413,6 +413,30 @@ Flips the boolean value of the **source**. If **source** value is "*True*", retu
413413
| --- | --- | --- | --- |
414414
| **source** |Required |Boolean String |Expected **source** values are "True" or "False". |
415415

416+
---
417+
### NumFromDate
418+
**Function:**<br>
419+
NumFromDate(value)
420+
421+
**Description:**<br>
422+
The NumFromDate function converts a DateTime value to Active Directory format that is required to set attributes like [accountExpires](https://docs.microsoft.com/windows/win32/adschema/a-accountexpires). Use this function to convert DateTime values received from cloud HR apps like Workday and SuccessFactors to their equivalent AD representation.
423+
424+
**Parameters:**<br>
425+
426+
| Name | Required/ Repeating | Type | Notes |
427+
| --- | --- | --- | --- |
428+
| **value** |Required | String | Date time string in the supported format. For supported formats, see https://msdn.microsoft.com/library/8kb3ddd4%28v=vs.110%29.aspx. |
429+
430+
**Example:**<br>
431+
* Workday example <br>
432+
Assuming you want to map the attribute *ContractEndDate* from Workday which is in the format *2020-12-31-08:00* to *accountExpires* field in AD, here is how you can use this function and change the timezone offset to match your locale.
433+
`NumFromDate(Join("", FormatDateTime([ContractEndDate], "yyyy-MM-ddzzz", "yyyy-MM-dd"), "T23:59:59-08:00"))`
434+
435+
* SuccessFactors example <br>
436+
Assuming you want to map the attribute *endDate* from SuccessFactors which is in the format *M/d/yyyy hh:mm:ss tt* to *accountExpires* field in AD, here is how you can use this function and change the time zone offset to match your locale.
437+
`NumFromDate(Join("",FormatDateTime([endDate],"M/d/yyyy hh:mm:ss tt","yyyy-MM-dd"),"T23:59:59-08:00"))`
438+
439+
416440
---
417441
### RemoveDuplicates
418442
**Function:**<br>

0 commit comments

Comments
 (0)