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
Memorable Member
Memorable Member

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
wyotim
Resident Rockstar
Resident Rockstar

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
Memorable Member
Memorable Member

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.

Anonymous
Not applicable

thanks.. i got this working

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (5,129)