cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New Member

Date value from dropdown boxes for month and year

Hi all,

 

I’m having some issues creating a date value for a column in sql database based on input from powerapps from 2 dropdown boxes, one for year selection and one for month selection. 
using the datepicker is not an option as this does not fit with the purpose for users.

 

e.g users selects from dropdown Month: 8 and from dropdown Year 2020. The day will be a default value (for example 01).

I want to add the date 01/08/2020 now to the database.

I’m trying at the moment with :

Datevalue(concatenate(“01/“,dropdown_Month.SelectedText, “/“, Dropdown_Year.SelectedText)) 

but this does not work. Any solutions for this? 

thanks in advance! 

3 REPLIES 3
Super User
Super User

hi @Pdh1 have alook at this: Working with date/time values and SQL Server | Microsoft Power Apps

 

hope it helps

 

Thanks.

This does not solve my issue though, how should I create a date in powerapps from my dropdown boxes month & year (default first of the month)? 
This is the step where I am having issues, connection with SQL and date column seems to work ok. 

Super User
Super User

hi @Pdh1 try Dropdown_Year.SelectedText & "-"& dropdown_Month.SelectedText & "-01"

 

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Top Solution Authors
Top Kudoed Authors
Users online (64,379)