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

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Hi All,
I am using the table with the web links to extract data from the web below is the query editor.

The data when I extract is not picking up from 18/01/2000 it's just picking up for 1 year and doesn't show any error.
I am using TT for until today.
Number to text for group data.


Is there any mistake why this is not picking data from 18/01/2000
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
(year as number) as table=>

let

TT= Text.From(Date.From(DateTime.LocalNow())),
Source = Web.Page(Web.Contents("https://cmweb.amsys-prod.railapps.XXXXXXBBBBXXXX.au/Default.aspx?Group="&Number.ToText(year)&"&Status=0&DateFrom=18/01/2000&DateTo="&TT&"")),
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}, {"Column15", type text}, {"Column16", type text}, {"Column17", type text}, {"Column18", type text}, {"Column19", type text}})
in
#"Changed Type"
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Thanks
 
Upvote 0
where is the (year) definition?
what is the value of the (year) in case above?
why Number.ToText() ?
 
Upvote 0
Year Definition is in the Top --
(year as number) as table=>​
Value of the year is = 3 or 4 or 5 or 6 based on the web link which changes based on the department.​
Number.To Text () .. is to convert
3 or 4 or 5 or 6 not sure whats in the web link so changed to text.i
I am using a custom colum to get data when i get the data

Capture.PNG




(year as number) as table=>​


let

TT= Text.From(Date.From(DateTime.LocalNow())),
Source = Web.Page(Web.Contents("​
https://cmweb.amsys-prod.railapps.XXXXXXBBBBXXXX.au/Default.aspx?Group=
"&Number.ToText(year)&"&Status=0&DateFrom=18/01/2000&DateTo="&TT&"")),
Data5 = Source{5}[Data],​
 
Upvote 0
Capture.PNG

is this just the code you posted without tags [CODE] your M-code should be here! [/CODE]
this not so hard to use CODE tags

check differences (if any) between working / not working urls

what's kind of error (if any) you got?
 
Upvote 0
your RangeStart is 29/09/2019 so maybe this

I have no idea without whole code, working URL and with such sparse information, sorry
 
Upvote 0

Forum statistics

Threads
1,223,229
Messages
6,170,881
Members
452,364
Latest member
springate

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