GET date from web page

sal21

Active Member
Joined
Apr 1, 2002
Messages
291

Attachments

  • Immagine.jpg
    Immagine.jpg
    76.6 KB · Views: 14

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
What do you mean by the "update date"? Github has an API you can query for each repository which returns all manner fo stats and details about the repo - it just depends on what you're after. Also what you tried?
 
Upvote 0
Does this have anything to do with the all the help others have given you? I note that @BennyBatt kindly provided you some code in respect of your request for help to download a CSV from the above Github repo to which you never responded. This isn't a free coding service, sorry. Good luck.
 
Upvote 0
SORRY for that!
Maybe I didn't see the email with the reply...
I see now the code. I test now!
 
Upvote 0
Sigh.. curiosity got the better of me. Here you go:

VBA Code:
Public Sub GetGithubUpdate()
    Dim URL As String
    URL = "https://api.github.com/repos/gnekt/geolocalizzazione-comuni-italiani"
    MsgBox GetDetails(URL, "updated_at")
End Sub

Public Function GetDetails(ByVal URL As String, Optional ByVal JSONField As String = "updated_at") As Date
    Dim JSON As String, UpdatedAt As Variant, UpdatedDate As Date
    JSON = Application.WebService(URL)
    UpdatedAt = Split(Split(JSON, JSONField & Chr(34) & ":" & Chr(34))(1), Chr(34))(0)
    UpdatedDate = CDate(Split(UpdatedAt, "T")(0))
    GetDetails = UpdatedDate
End Function

1697364185565.png
 
Upvote 0
Sigh.. curiosity got the better of me. Here you go:

VBA Code:
Public Sub GetGithubUpdate()
    Dim URL As String
    URL = "https://api.github.com/repos/gnekt/geolocalizzazione-comuni-italiani"
    MsgBox GetDetails(URL, "updated_at")
End Sub

Public Function GetDetails(ByVal URL As String, Optional ByVal JSONField As String = "updated_at") As Date
    Dim JSON As String, UpdatedAt As Variant, UpdatedDate As Date
    JSON = Application.WebService(URL)
    UpdatedAt = Split(Split(JSON, JSONField & Chr(34) & ":" & Chr(34))(1), Chr(34))(0)
    UpdatedDate = CDate(Split(UpdatedAt, "T")(0))
    GetDetails = UpdatedDate
End Function

View attachment 100352

curiosity...which editor you use to have black background, and blue for statement?
the code is very simple to read.
 
Upvote 0
Thats the normal VBA ide. I've just customised the colours in the settings. There aren't alot of colors available, but it's worth it.
 
Upvote 0

Forum statistics

Threads
1,215,882
Messages
6,127,532
Members
449,385
Latest member
KMGLarson

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