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

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
Advocate II
Advocate II

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 🙂

Hi,

 

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

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
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (20,412)