cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Super User
Super User

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
Highlighted
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.
Highlighted
Super User
Super User

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

Highlighted
Anonymous
Not applicable

Re: How can I achieve a date from a value

thanks.. i got this working

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (5,142)