cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Pdh1
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
rubin_boer
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. 

rubin_boer
Super User
Super User

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

 

Helpful resources

Announcements
User Groups Public Preview

Join us for our User Group Public Preview!

Power Apps User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.

Power Apps Community Call

Monthly Power Apps Community Call

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

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (60,708)