web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to initialize Date...
Power Automate
Answered

How to initialize Date Type variable

(2) ShareShare
ReportReport
Posted on by Microsoft Employee

There is no "Date Type" when creating/initilizing variables. Is there any way to work with Date types(adding, subtracting time from existing dates in the lists)?

Categories:
I have the same question (0)
  • Verified answer
    vecerpa Profile Picture
    786 on at

    Hi @Anonymous,

     

    Yes it is possible to work with datetime from list, for example below I used created on item of sharepoint list.

     

    DateTime1.PNGDateTime2.PNG

    Just use string type and then you are open to use datetime functions - https://docs.microsoft.com/cs-cz/azure/logic-apps/logic-apps-workflow-definition-language.

     

    There s like adddays(), formatdatetime(), addhours(), addminutes()...

    Hope this helped a bit

    P.

  • vecerpa Profile Picture
    786 on at

    And there is also a set of Date Time actions that I forgot...

     

    DateTime3.PNG

     

    🙂

    P.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks so much for your help! Your screenshots with comments were very helpful.

    Is there any source for learning syntax used in the expressions? For example, using variables or field values inside addDate() expression was not something that I could have seen in internet or Flow documentations. 

    Thanks!

  • Verified answer
    vecerpa Profile Picture
    786 on at

    Hi @Anonymous,

    Yes in link I posted there is Azure Logic Apps - https://docs.microsoft.com/cs-cz/azure/logic-apps/logic-apps-workflow-definition-language

    Flow is based on Azure Logic Apps, so there is possible to find description of functions that are used.

    P.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks for the response and the link!

    🙂

  • hiteshn Profile Picture
    61 on at

    Hi,

     

    There is not any such variable type that can be used for the dates in power automate, it can be stored in string type. Instead of this I used Compose action and just stored the date in value.

    Using this original format type is reserved and does not need any conversions ahead.

     

    To further work with updates such as adding, subtracting, etc. we can directly save these actions in compose variable or if already saved, 'Outputs' from compose action can be used.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard