Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6808937
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:01:04+00:00 2026-05-26T20:01:04+00:00

I manage a website that pulls data in from an XML file, the file

  • 0

I manage a website that pulls data in from an XML file, the file is updated every night around midnight. I am trying to write a simple piece of code that says on the website, File Last Updated: something something. After poking around and trying several different solutions, (I tried several variations using FileInfo to no avail) I decided to post here.

I tried Both GetCreationTime and GetLastWriteTime with FileInfo but I keep getting back 12/30/1600 or something similar no where near the correct date. When the file gets uploaded it just overwrites the old one so I wasn’t sure which method to use either.

Current Filinfo Code:

    FileInfo fileInfo = new FileInfo("feed/VEHICLES.XML");
    DateTime timeOfCreation = fileInfo.CreationTime;
    modifieddate.Text = timeOfCreation.ToString();

this returns 12/31/1600 7:00:00 PM but it should be 11/14/2011 1:41 AM

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T20:01:04+00:00Added an answer on May 26, 2026 at 8:01 pm

    You’re using a relative path without knowing what the current directory is.

    You probably want Server.MapPath("~/feed/VEHICLES.XML").
    If the file isn’t in your application directory, you’ll need to find its absolute path.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Please could someone help im building my first website that pulls info from a
I'm currently trying to write a website for testing / learning purposes that will
I'm currently using Subversion to manage my ASP.NET website. I'm finding that whenever I
I put together a simple system so that my dad can manage a website
I´m working on an app that displays 6 pictures from a website. These pictures
I have a public-facing website that is used to manage business infrastructure equipment for
I'm developing a data access component that will be used in a website that
I want to write a program in C++ that helps to manage my hockey
I'm trying to use the demo that is on the devexpress website to build
I have currently created a facebook like page that pulls notifications from different tables,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.