Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Last Refresh Date - Alternative Solution

I am currentyl using the following DAX sattement to calculate a time stamp for Last Refresh:   = DateTime.Time(DateTime.LocalNow()) & DateTime.Date(DateTime.LocalNow())   Increasingly, I need a s...
  • RMDNA's avatar
    8 years ago

    Hi Anonymous,

     

    I've found this to be useful when I'm designing reports for worldwide customers. Rather than dealing with general timezones and DST/etc., just pull data related to the location itself.

     

    Query:

     

    let

        Source = Web.Page(Web.Contents("http://localtimes.info/Asia/Saudi_Arabia/Riyadh/")),

        Data1 = Source{1}[Data],

        #"Changed Type" = Table.TransformColumnTypes(Data1,{{"Column1", type text}, {"Column2", type text}}),

        date = #"Changed Type"{1}[Column2],

        time=#"Changed Type"{0}[Column2],

        datetime=DateTime.FromText(date&" "&time)

    in

        datetime

     

     

    Output example: