cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Date format is not changing on card

Hi All,

 

I cannot seem to change the format of a card on a form from Dynamics Nav, i have tried using a text format function with success in other areas of the app and no issues at all. I have attached what is on the app at this time but this seems now not to work. I have also used a text short date format but this hasnt worked either and i cannot seem to figure this one out on my own.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Frequent Visitor

Re: Date format is not changing on card

Thanks but a developer friend helped me resolve this one with a logic fix.

 

Below is what the code does in the background, its not perfect but is gets the job done.

 

If(And((Len(Mid( Parent .Default,Find("/", Parent .Default)+1,Find("/", Parent .Default,Find("/", Parent .Default)+1)-1-Find("/", Parent .Default))))=1,(Len(Left( Parent .Default,Value(Find("/", Parent .Default))-1))=1)),
Concatenate("0",Mid( Parent .Default,Find("/", Parent .Default)+1,Find("/", Parent .Default,Find("/", Parent .Default)+1)-1-Find("/", Parent .Default)),"/0",Left( Parent .Default,Value(Find("/", Parent .Default))-1),"/",Right( Parent .Default,4)),
If(Len(Mid( Parent .Default,Find("/", Parent .Default)+1,Find("/", Parent .Default,Find("/", Parent .Default)+1)-1-Find("/", Parent .Default)))=1,
Concatenate("0",Mid( Parent .Default,Find("/", Parent .Default)+1,Find("/", Parent .Default,Find("/", Parent .Default)+1)-1-Find("/", Parent .Default)),"/",Left( Parent .Default,Value(Find("/", Parent .Default))-1),"/",Right( Parent .Default,4)),
If(Len(Left( Parent .Default,Value(Find("/", Parent .Default))-1))=1,
Concatenate(Mid( Parent .Default,Find("/", Parent .Default)+1,Find("/", Parent .Default,Find("/", Parent .Default)+1)-1-Find("/", Parent .Default)),"/0",Left( Parent .Default,Value(Find("/", Parent .Default))-1),"/",Right( Parent .Default,4)),
Concatenate(Mid( Parent .Default,Find("/", Parent .Default)+1,Find("/", Parent .Default,Find("/", Parent .Default)+1)-1-Find("/", Parent .Default)),"/",Left( Parent .Default,Value(Find("/", Parent .Default))-1),"/",Right( Parent .Default,4)))))

View solution in original post

3 REPLIES 3
Highlighted
Advocate II
Advocate II

Re: Date format is not changing on card

what is Default.Parent ? is it the today date ?

 

if so, try this <<Text(Today();"[$-en-GB]mm/dd/yyyy")>>

without the << >>

today is 06-06-2019, so to distinguish between day and month try <<mm/d/yyyy>> or <<m/dd/yyyy>>.

Let us know how it goes 🙂

Highlighted
Frequent Visitor

Re: Date format is not changing on card

Hi,

 

Thanks for the reply, it is a Parent.Default, i have tried this but with no luck.

Highlighted
Frequent Visitor

Re: Date format is not changing on card

Thanks but a developer friend helped me resolve this one with a logic fix.

 

Below is what the code does in the background, its not perfect but is gets the job done.

 

If(And((Len(Mid( Parent .Default,Find("/", Parent .Default)+1,Find("/", Parent .Default,Find("/", Parent .Default)+1)-1-Find("/", Parent .Default))))=1,(Len(Left( Parent .Default,Value(Find("/", Parent .Default))-1))=1)),
Concatenate("0",Mid( Parent .Default,Find("/", Parent .Default)+1,Find("/", Parent .Default,Find("/", Parent .Default)+1)-1-Find("/", Parent .Default)),"/0",Left( Parent .Default,Value(Find("/", Parent .Default))-1),"/",Right( Parent .Default,4)),
If(Len(Mid( Parent .Default,Find("/", Parent .Default)+1,Find("/", Parent .Default,Find("/", Parent .Default)+1)-1-Find("/", Parent .Default)))=1,
Concatenate("0",Mid( Parent .Default,Find("/", Parent .Default)+1,Find("/", Parent .Default,Find("/", Parent .Default)+1)-1-Find("/", Parent .Default)),"/",Left( Parent .Default,Value(Find("/", Parent .Default))-1),"/",Right( Parent .Default,4)),
If(Len(Left( Parent .Default,Value(Find("/", Parent .Default))-1))=1,
Concatenate(Mid( Parent .Default,Find("/", Parent .Default)+1,Find("/", Parent .Default,Find("/", Parent .Default)+1)-1-Find("/", Parent .Default)),"/0",Left( Parent .Default,Value(Find("/", Parent .Default))-1),"/",Right( Parent .Default,4)),
Concatenate(Mid( Parent .Default,Find("/", Parent .Default)+1,Find("/", Parent .Default,Find("/", Parent .Default)+1)-1-Find("/", Parent .Default)),"/",Left( Parent .Default,Value(Find("/", Parent .Default))-1),"/",Right( Parent .Default,4)))))

View solution in original post

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

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 (7,134)