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

Notifications

Announcements

Community site session details

Community site session details

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

How to initialize Date Type variable

(2) ShareShare
ReportReport
Posted on by

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
    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
    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard