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 Apps / Get the date from a Sh...
Power Apps
Answered

Get the date from a Sharepoint list

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello, 

 

I'm trying to get the date from a SharePoint list, that way I can compare the month and day to show a message in the app to the user. I was trying to use the lookup function without success. I'd like to know what I'm doing wrong below is the format 

 

Captura de Pantalla 2021-03-10 a la(s) 9.00.29 p. m..png

I tried If(lookup(DataSource;nameofcolumn = "15/03/2021") ; "Not Avaliable"; "Avaliable")

 

Is there a way to extract the month and day?

Captura de Pantalla 2021-03-10 a la(s) 9.00.29 p. m..png
Categories:
  • Verified answer
    v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    Could you please share more details about your scenario? Where would you like to display the message when month and date meet the condition? Which type is the date column, Date and time not include time?

     

    Assuming the date column is Date and time column without time, you could leverage Month and Day functions to retrieve month and day value from a Date time value, please refer to below official doc:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-datetime-parts#syntax

     

    Or you could convert the Date and time value into Text for comparation:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-text#datetime

    Text(DateValue, DateTimeFormat.ShortDate)

     

    On your end, the formula in your post could be modified to:

     

    If(!IsBlank(LookUp(DataSource;Text(nameofcolumn, DateTimeFormat.ShortDate) = "15/03/2021")) ; "Not Avaliable"; "Avaliable")

     

    This means if look up the data source and find any record that date time field value equals to the string "15/03/2021", then return the message "Not Avaliable", otherwise return message "Avaliable".

     

    Another way is to convert the string "15/03/2021" to a Date time format for comparation:

     

    If(!IsBlank(LookUp(DataSource;nameofcolumn = DateValue("15/03/2021","eu-ES"))) ; "Not Avaliable"; "Avaliable")

     

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-datevalue-timevalue#syntax

     

    Hope this helps.

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    Have you resolved the issue? 

    If above post helps, then please consider Accept it as the solution to help the other members find it.


    Best regards,
    Community Support Team _ Jeffer Ni

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 381 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 340

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard