Home > SQL Server > Get the File Last Modified datetime from HTTP Header – SSIS

Get the File Last Modified datetime from HTTP Header – SSIS


This VB.Net code can be used to get the Last modified date of a file from HTTP header. It can be used to check the file date before the actual file is downloaded to out computer. It save some time and network resources. You can pass different header key to get its value.

But, this example is to get the last modified date of a file from Houstontx.gov website.

Dim request As HttpWebRequest = HttpWebRequest.Create _
(“http://gisdata.houstontx.gov/cohgis/cohgis2011_2010census10.zip“)
Dim response As HttpWebResponse

response = request.GetResponse()

Dim HTTPHeader_LastModified_Datetime As String
HTTPHeader_LastModified_Datetime = response.GetResponseHeader(“Last-Modified”)

MsgBox(HTTPHeader_LastModified_Datetime)

Hope you will like it.

Advertisements
Categories: SQL Server
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: