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 / extract Month in a new...
Power Apps
Answered

extract Month in a new column from the Date column formatted as m/d/yyyy

(0) ShareShare
ReportReport
Posted on by 25

Hello, 

I am trying to add a new column to my collection coltemp that must include the month in the column Date. 

Regrettably, with the code AddColumns(coltemp, "mes",Month("Date")) power apps understands that the month is January in every single date. 

Any ideas, please?

I have tried several options but with no result. 

Thank you. 

gol_0-1679589414972.png

 

Categories:
  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    Hi @gol,

     

    Could you try removing the double quotes from Date:

    AddColumns(
     coltemp, 
     "mes",
     Month(Date)
    )

     

    Alternatively you could try and explicitly define the column as a DateValue first:

    AddColumns(
     coltemp, 
     "mes",
     Month(DateValue(Date))
    )

     

    If this solves your question, would you be so kind as to accept it as a solution.

    Thanks!

  • LaurensM Profile Picture
    12,516 Moderator on at

    (Accidental double post)

  • DavidZoon Profile Picture
    738 Most Valuable Professional on at

    Hello,

     

    DateTimeValue() function will solve your issue : 

     

    AddColumns(coltemp, "mes",Month(DateTimeValue(Date,"m/d/yyyy hh:mm:ss AM/PM"))) 

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily.

  • gol Profile Picture
    25 on at

    Thank you so much! It works perfectly.

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 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 223

Last 30 days Overall leaderboard