cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BradKCox
Level: Powered On

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
BradKCox
Level: Powered On

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
ProNewbie
Level: Powered On

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 🙂

BradKCox
Level: Powered On

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
BradKCox
Level: Powered On

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
thirdimage

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

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

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