cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

How can I achieve a date from a value

Hi Everyone. 

I have a birthday column with values like below where first two digits are date(dd) and last two are months(mm)

2411

0908

2211

....

.....

 

what is the best way to achieve a date format(mm/dd/yyyy) out of these values. 

Also the YYYY value should be automated.  it should reflect the current year.

1 ACCEPTED SOLUTION

Accepted Solutions
Mike8
Level 10

Re: How can I achieve a date from a value

Hello Partha,

An example to use as a reference:
Button1.OnSelect= ClearCollect(ColBirthday,1111,2202,3103,1305)

Gallery1.Items = AddColumns(ColBirthday,"Date",Left(Text(Value),2)&"-"&Right(Text(Value),2)&"-"&Year(Today()))
You can add two labels in the gallery  and if you set Label1.Text = ThisItem.Date, you can see the date you have asked for.

View solution in original post

3 REPLIES 3
Super User
Super User

Re: How can I achieve a date from a value

I would do something like
Date(Year(Today()), Right(DateValue, 2), Left(DateValue, 2))
where DateValue is the four digit birthday. You could then wrap that in a Text function to get the desired formatting like Text(..., “mm/did/yyyy”). I am away from my computer so hopefully I nailed the syntax. If not, hopefully the general idea is there.
Mike8
Level 10

Re: How can I achieve a date from a value

Hello Partha,

An example to use as a reference:
Button1.OnSelect= ClearCollect(ColBirthday,1111,2202,3103,1305)

Gallery1.Items = AddColumns(ColBirthday,"Date",Left(Text(Value),2)&"-"&Right(Text(Value),2)&"-"&Year(Today()))
You can add two labels in the gallery  and if you set Label1.Text = ThisItem.Date, you can see the date you have asked for.

View solution in original post

Anonymous
Not applicable

Re: How can I achieve a date from a value

thanks.. i got this working

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,559)