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

Modify date format // Create column with working days

Hello everyone,

 

Firts of all, please pardon me for my approximative english Smiley Wink

 

I have 2 issues concerning a date :

 

1) The dates are downloaded from an SQL server. They are in the following format "20190711" (here, for July the 11th of 2019" and I would like to change it into a common form such as 11/07/2019. I tried with "column form example" and it doesn't work. How can I do this ?

 

2) After resolving the first issue i'd like to create a column based on the data of 2 others : Purchase Order Date and Entry Date which represent respectively the date at which we received the order and the date on which we entered this order in our system. I would like to write "OK" if the entry has been done within 2 working days and "NON OK" if the entry has been done in more than 2 days. The issue is the non working days (saturday and sunday). How can i resolve these problems ? 

 

 

Thanks for helping Smiley Happy

 

1 ACCEPTED SOLUTION

Accepted Solutions
tex628 New Contributor
New Contributor

Re: Modify date format // Create column with working days

1.) 

Column = LEFT(Table2[Column1] , 4 ) & "-" & RIGHT(LEFT(Table2[Column1] , 6),2) & "-" & RIGHT(Table2[Column1] , 2)

2.) 
Calculatieng the difference between two dates where you exclude weekends is abit more complicated. Start by creating a calendartable and using the weekday() syntax there to indentify which days that are weekends. 

1 REPLY 1
tex628 New Contributor
New Contributor

Re: Modify date format // Create column with working days

1.) 

Column = LEFT(Table2[Column1] , 4 ) & "-" & RIGHT(LEFT(Table2[Column1] , 6),2) & "-" & RIGHT(Table2[Column1] , 2)

2.) 
Calculatieng the difference between two dates where you exclude weekends is abit more complicated. Start by creating a calendartable and using the weekday() syntax there to indentify which days that are weekends. 

Helpful resources

Announcements
Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

Virtual Launch Event

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 418 members 4,417 guests
Please welcome our newest community members: