# PowerQuery formula for finding a week start date for weeks that start on Saturday



## Monsignor (Dec 14, 2015)

I have weeks that run Saturday to Friday and have a formula in native Excel for looking at a date and calculating the right Saturday.

M language has a weekstart function that defaults to Sunday. What would be a formula for calculating Saturday, instead?


----------



## anvg (Dec 14, 2015)

Hi  There is not a weekstart function in M language. It has Date.StartOfWeek. 
	
	
	
	
	
	



```
let     source = Date.StartOfWeek(DateTime.LocalNow(), Day.Saturday) in     source
```
 Regards,


----------



## Monsignor (Dec 14, 2015)

THANK YOU anvg. You're right, there's no weekstart function. Your suggestion is perfect. Here's what I ended up with:


```
Date.StartOfWeek(([Ship Date]), Day.Saturday))
```


----------

