cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Super User
Super User

Re: URL based date dependent data request from server - M-script/Query

Sorry, but I'm out here. Hope that someone else picks this up (otherwise you might consider opening a new thread)

 

This code isn't working either:

let
    Now = DateTime.LocalNow(),
    Yesterday = Date.AddDays(Now, -1),
    Date = DateTime.ToText(Yesterday, "dd-MM-yyyy hh:mm") ,   
    Date2 = DateTime.ToText(Now, "dd-MM-yyyy hh:mm"),

Output =   Web.Contents(
             "http://onboard.dsb.dk/data/glovadata/search/csv?StartTimeLocal=12-04-2019%2002%3A12&EndTimeLocal=13-04-2019%2002%3A12", 
             [Query=[StartTimeLocal=Date, EndTimeLocal=Date2]]
            )
            
in
    Output

image.png

Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

Imke Feldmann

How to integrate M-code into your solution -- Check out more PBI- learning resources here -- Performance Tipps for M-queries