Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
How to convert Incremental refresh date parameter to ISO 8601?
Date must be provided ISO 8601 (e.g.2020-01-08T11:17:20Z)
i have webcontents parameters
,Query=
[
from = Date.ToText(RangeStart), // This produce errror
till = Date.ToText(DateTime.Date(Date.AddMonths(DateTime.LocalNow(),0)), "yyyy-MM-dd") //NOW
]
error
Expression.Error: We cannot convert the value #datetime(2022, 1, 1, 0, 0, 0) to type Date.
Details:
Value=2022-01-01 00:00:00
Type=[Type]
But if i use from = Date.ToText(DateTime.Date(RangeStart), "yyyy-MM-ddThh:mm:ssZ")
i got error DataSource.Error: Web.Contents failed to get contents from
i think this is beacause of escape : to %3A in parameter &from=2022-01-01T12%3A00%3A00Z&till=2022-03-22
so how to avoid %3A
Solved! Go to Solution.
Hi @Digger ,
Have you tried this?
Reference:
DateTimeZone.ToText - PowerQuery M | Microsoft Docs
Convert DateTime to ISO 8601 date and time strings in Power Query – (thebiccountant.com)
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Digger ,
Have you tried this?
Reference:
DateTimeZone.ToText - PowerQuery M | Microsoft Docs
Convert DateTime to ISO 8601 date and time strings in Power Query – (thebiccountant.com)
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.