To change date in Qurey Editor -To Dynamic Web link as per the computer date

murthysydney

New Member
Joined
Dec 16, 2019
Messages
23
Office Version
  1. 365
Platform
  1. Windows

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
I am not sure what are you trying to do (link doesn't work) but maybe Date.From(DateTime.LocalNow()) will help
 
Upvote 0
I am not sure what are you trying to do (link doesn't work) but maybe Date.From(DateTime.LocalNow()) will help

As i said its a company webapplication which cannot be accessed externally , (Date.From(DateTime.LocalNow()) where it needs to be replaced .
 
Upvote 0
post first line of your M-code (after let) - hope this is not classified :)

use CODE tags
 
Upvote 0
post first line of your M-code (after let) - hope this is not classified :)

use CODE tags

HI Mate the below is the M Code.. The Date To - Highligted in RED needs to be dyanamic as per the computer Date ..which can be hard coded.


let
Source = Web.Page(Web.Contents("https://cXXXXX.amsys-prod.trainapps.XXX.au/Default.aspx?Group=3&Status=1&DateFrom=20/12/2018&DateTo=01/12/2019")),
Data5 = Source{5}[Data],

#"Changed Type" = Table.TransformColumnTypes(Data5,{{"Column1", type text}, {"Column2", Int64.Type}, {"Column3", type text}, {"Column4", type date}, {"Column5", type text}, {"Column6", type text}, {"Column7", type text}, {"Column8", type text}, {"Column9", type text}, {"Column10", type text}, {"Column11", type text}, {"Column12", Int64.Type}, {"Column13", Int64.Type}, {"Column14", Int64.Type}, {"Column15", type text}, {"Column16", type text}, {"Column17", type text}, {"Column18", type text}, {"Column19", type text}})

in

#"Changed Type"
 
Upvote 0
Upvote 0
or
Rich (BB code):
let
    TT = Text.From(Date.From(DateTime.LocalNow())),
    Source = Web.Page(Web.Contents("https://cXXXXX.amsys-prod.trainapps.XXX.au/Default.aspx?Group=3&Status=1&DateFrom=20/12/2018&DateTo="&(TT)&"")),
    (rest of the code)
 
Upvote 0

Forum statistics

Threads
1,215,575
Messages
6,125,613
Members
449,238
Latest member
wcbyers

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top