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.

View solution in original post

Anonymous
Not applicable

thanks.. i got this working

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (3,030)