# DateFormat Transform

**URL:** <https://developer.sailpoint.com/discuss/t/dateformat-transform/175747>\
**Category:** SHF Discussion and Questions\
**Tags:** identity-security-cloud, transforms\
**Created:** [September 2, 2025, 11:05am UTC](https://developer.sailpoint.com/discuss/t/dateformat-transform/175747 "2025-09-02T11:05:11Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![LearningStar](https://avatars.discourse-cdn.com/v4/letter/l/a9a28c/32.png) [@LearningStar](https://developer.sailpoint.com/discuss/u/LearningStar)\
**Post date:** [September 2, 2025, 11:05am UTC](https://developer.sailpoint.com/discuss/t/dateformat-transform/175747/1 "2025-09-02T11:05:12Z")

</div>

Hi Team,

I need to Generate the current date in ‘yyyy-mm-dd’ format, I tried below transform but its showing me 8601 FORMATS only, can’t we get the date in this format?

input : 2025-09-02T09:29:40.845224Z

Output : 2025-09-02

```auto
{
    "name": "gagan-testtransform-Date",
    "type": "dateFormat",
    "attributes": {
        "input": {
            "type": "dateMath",
            "attributes": {
                "expression": "now",
                "roundUp": false
            }
        },
        "outputFormat": "yyyy-MM-dd"
    }
}

```

---

<div class="post-metadata">

**Author:** ![amishra97](https://avatars.discourse-cdn.com/v4/letter/a/50afbb/32.png) [@amishra97](https://developer.sailpoint.com/discuss/u/amishra97)\
**Post date:** [September 2, 2025, 11:31am UTC](https://developer.sailpoint.com/discuss/t/dateformat-transform/175747/2 "2025-09-02T11:31:08Z")

</div>

@LearningStar

Try below transform

```json
{
  "attributes": {
    "inputFormat": "ISO8601",
    "outputFormat": "yyyy-MM-dd",
    "input": {
      "attributes": {
        "expression": "now",
        "roundUp": false
      },
      "type": "dateMath"
    }
  },
  "type": "dateFormat",
  "name": "Date Format Transform"
}

```

---

<div class="post-metadata">

**Author:** ![HussainshaSyed001](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/hussainshasyed001/32/28234_2.png) [@HussainshaSyed001](https://developer.sailpoint.com/discuss/u/HussainshaSyed001)\
**Post date:** [September 2, 2025, 11:31am UTC](https://developer.sailpoint.com/discuss/t/dateformat-transform/175747/3 "2025-09-02T11:31:16Z")

</div>

try like this

{  
“name”: “Test-DateTransform”,  
“type”: “dateFormat”,  
“attributes”: {  
“input”: {  
“type”: “dateMath”,  
“attributes”: {  
“expression”: “now”  
}  
},  
“inputFormat”: “ISO8601”,  
“outputFormat”: “yyyy-MM-dd”  
}  
}

---

<div class="post-metadata">

**Author:** ![sup3rmark](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/sup3rmark/32/36229_2.png) [@sup3rmark](https://developer.sailpoint.com/discuss/u/sup3rmark)\
**Post date:** [September 2, 2025, 1:12pm UTC](https://developer.sailpoint.com/discuss/t/dateformat-transform/175747/4 "2025-09-02T13:12:37Z")

</div>

not sure if this reflects what you’re actually trying to do with your transform or if it’s just an example, but just as a heads-up - it’s not best practice to tie an identity attribute to a transform that returns the current date/time. this will then update for every user every time identities are processed, which will cause a lot of annoying clutter in the Access History list.

---

<div class="post-metadata">

**Author:** ![LearningStar](https://avatars.discourse-cdn.com/v4/letter/l/a9a28c/32.png) [@LearningStar](https://developer.sailpoint.com/discuss/u/LearningStar)\
**Post date:** [September 2, 2025, 2:12pm UTC](https://developer.sailpoint.com/discuss/t/dateformat-transform/175747/5 "2025-09-02T14:12:28Z")

</div>

We are currently implementing this for testing purposes, and later it will be integrated into our account provisioning plan. Before incorporating it into our provisioning policy, I wanted to validate the format with you to ensure everything aligns with best practices.

Thank you in advance for your guidance and suggestions.

---

<div class="post-metadata">

**Author:** ![sup3rmark](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/sup3rmark/32/36229_2.png) [@sup3rmark](https://developer.sailpoint.com/discuss/u/sup3rmark)\
**Post date:** [September 2, 2025, 3:07pm UTC](https://developer.sailpoint.com/discuss/t/dateformat-transform/175747/6 "2025-09-02T15:07:20Z")

</div>

got it. this would be fine to include in a provisioning plan directly!

---

<div class="post-metadata">

**Author:** ![LearningStar](https://avatars.discourse-cdn.com/v4/letter/l/a9a28c/32.png) [@LearningStar](https://developer.sailpoint.com/discuss/u/LearningStar)\
**Post date:** [September 9, 2025, 10:45am UTC](https://developer.sailpoint.com/discuss/t/dateformat-transform/175747/7 "2025-09-09T10:45:40Z")

</div>

Hey , I tried its not working showing me blank output. Shall I put my requirement here again for better understanding ?  
I am looking to pass current date of today in my Disable Account policy in this format yyyy-mm-dd format.

---

<div class="post-metadata">

**Author:** ![LearningStar](https://avatars.discourse-cdn.com/v4/letter/l/a9a28c/32.png) [@LearningStar](https://developer.sailpoint.com/discuss/u/LearningStar)\
**Post date:** [September 9, 2025, 10:46am UTC](https://developer.sailpoint.com/discuss/t/dateformat-transform/175747/8 "2025-09-09T10:46:37Z")

</div>

Hey @amishra97 , I tried its not working showing me blank output. Shall I put my requirement here again for better understanding ?  
I am looking to pass current date of today in my Disable Account policy in this format yyyy-mm-dd format. Can you suggest what should be the best option.

---

<div class="post-metadata">

**Author:** ![LearningStar](https://avatars.discourse-cdn.com/v4/letter/l/a9a28c/32.png) [@LearningStar](https://developer.sailpoint.com/discuss/u/LearningStar)\
**Post date:** [September 9, 2025, 11:02am UTC](https://developer.sailpoint.com/discuss/t/dateformat-transform/175747/9 "2025-09-09T11:02:26Z")

</div>

Hey @sjoyee , any help from your side to get the desired output 🙂

---

<div class="post-metadata">

**Author:** ![TheOneAMSheriff](https://avatars.discourse-cdn.com/v4/letter/t/ee59a6/32.png) [@TheOneAMSheriff](https://developer.sailpoint.com/discuss/u/TheOneAMSheriff)\
**Post date:** [September 9, 2025, 11:51am UTC](https://developer.sailpoint.com/discuss/t/dateformat-transform/175747/10 "2025-09-09T11:51:47Z")

</div>

Hey Gagan,

The issue with your original transform was a **format mismatch** between the **dateMath** output and **dateFormat** input expectations:`dateMath` with `"expression": "now"` outputs in format `"yyyy-MM-dd'T'HH:mm"`. This mismatch caused the blank output

**Working Transform:**

```json
{
  "name": "Current Date", 
  "type": "dateFormat",
  "attributes": {
    "input": {
      "type": "dateMath",
      "attributes": {
        "expression": "now"
      }
    },
    "inputFormat": "yyyy-MM-dd'T'HH:mm",
    "outputFormat": "yyyy-MM-dd"
  }
}

```

This will give you the current date in `yyyy-MM-dd` format for your Disable Account policy.

Hope this helps!

---

<div class="post-metadata">

**Author:** ![suresh4iam](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/suresh4iam/32/29513_2.png) [@suresh4iam](https://developer.sailpoint.com/discuss/u/suresh4iam)\
**Post date:** [September 9, 2025, 11:59am UTC](https://developer.sailpoint.com/discuss/t/dateformat-transform/175747/11 "2025-09-09T11:59:52Z")

</div>

You can try the below approach,

Develop a below transform to get the current date with the required format

```json
{
        "name": "Get-TimeStamp",
        "type": "rule",
        "attributes": {
            "name": "Cloud Services Deployment Utility",
            "dateOffset": "",
            "referenceDate": "",
            "inputFormat": "",
            "operation": "getDate",
            "outputFormat": "yyyy-MM-dd"
        },
        "internal": false
    }

```

Update your Disable policy by referring the above transform. For example, the below AD policy referred the transform in the description AD attribute and given you the output as “_Disabled by ISC on 2025-09-09_“

```json
{
    "name": "Disable",
    "description": null,
    "usageType": "DISABLE",
    "fields": [
        {
            "name": "description",
            "transform": {
                "attributes": {
                    "values": [
                        "Disabled by ISC on ",
                        {
                            "attributes": {
                                "id": "Get-TimeStamp"
                            },
                            "type": "reference"
                        }
                    ]
                },
                "type": "concat"
            },
            "attributes": {
                "cloudRequired": "true"
            },
            "isRequired": false,
            "type": "string",
            "isMultiValued": false
        }
    ]
}

```

Hope, this helps you.

---

<div class="post-metadata">

**Author:** ![gogubapu](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/gogubapu/32/15242_2.png) [@gogubapu](https://developer.sailpoint.com/discuss/u/gogubapu)\
**Post date:** [September 9, 2025, 1:22pm UTC](https://developer.sailpoint.com/discuss/t/dateformat-transform/175747/13 "2025-09-09T13:22:52Z")

</div>

Hey @LearningStar ,

Try below transform

```auto
{ "name": "gagan-testtransform-Date",

"type": "dateFormat",

"attributes": {

    "input": {

        "type": "dateMath",

        "attributes": {

            "expression": "now",

            "roundUp": false

        }

    },

    "inputFormat": "yyyy-MM-dd’T’HH:mm:ss.SSSSSS’Z’",

    "outputFormat": "yyyy-MM-dd"

}
}

```

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [November 8, 2025, 1:23pm UTC](https://developer.sailpoint.com/discuss/t/dateformat-transform/175747/14 "2025-11-08T13:23:07Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
