Forum Discussion
DataSource.Error - enter value in a permitted format'
- 5 years ago
I'm guessing it is related to the day going to two digits (10) and your step where it adds "0" to it. Your last step should address that, but here is a simpler way to get to your desired format with Date.ToText.
let
Minus6MonthsFirstDayOfMonth = Date.StartOfMonth(Date.AddMonths(Date.From(DateTime.FixedLocalNow()),-6)),
Custom1 = Date.ToText(Minus6MonthsFirstDayOfMonth, "MM/dd/yyyy")
in
Custom1Pat
I'm guessing it is related to the day going to two digits (10) and your step where it adds "0" to it. Your last step should address that, but here is a simpler way to get to your desired format with Date.ToText.
let
Minus6MonthsFirstDayOfMonth = Date.StartOfMonth(Date.AddMonths(Date.From(DateTime.FixedLocalNow()),-6)),
Custom1 = Date.ToText(Minus6MonthsFirstDayOfMonth, "MM/dd/yyyy")
in
Custom1
Pat
mahoneypat Thanks that worked.