473,396 Members | 1,998 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

File Dates - Wrong date returned

Guys,

I am reading file information from disk using the System.IO.File object.

This is what the operating system is displaying on Explorer:
File Name Modified
====================================
File1.ext 6/19/2003 1:05 PM
File2.ext 6/14/2000 12:46 PM

This is what my program reads:
File Name Modified
====================================
File1.ext 12/7/1999 7:00:00 AM
File2.ext 9/19/2001 1:50:25 PM

It reads wrong dates (and the same) with all 3 methods:
File.GetCreationTime(FilePath)
File.GetLastAccessTime(FilePath)
File.GetLastWriteTime(FilePath)
(All 3 methods return the same date)

What am I doing wrong????

Is there any work I have to do on the dates to get this to work?
I am Eastern Time Zone by the way.

Thanks!
Nov 20 '05 #1
1 2325
Hi, Juan

Post a piece of code which you use to obtain modification timestamp from
file and to print it. Either something is not right there, either you are
getting wrong files (another directory maybe?).

HTH
Alex

"Juan Romero" <ju*********@bowne.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Guys,

I am reading file information from disk using the System.IO.File object.

This is what the operating system is displaying on Explorer:
File Name Modified
====================================
File1.ext 6/19/2003 1:05 PM
File2.ext 6/14/2000 12:46 PM

This is what my program reads:
File Name Modified
====================================
File1.ext 12/7/1999 7:00:00 AM
File2.ext 9/19/2001 1:50:25 PM

It reads wrong dates (and the same) with all 3 methods:
File.GetCreationTime(FilePath)
File.GetLastAccessTime(FilePath)
File.GetLastWriteTime(FilePath)
(All 3 methods return the same date)

What am I doing wrong????

Is there any work I have to do on the dates to get this to work?
I am Eastern Time Zone by the way.

Thanks!

Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Peter Pfeiffer | last post by:
I've written several scripts that have "while" blocks which increment a date by one day if the date does not match one of a group of dates. However, sometimes it apparently steps out out the while...
52
by: Andy Dingley | last post by:
I'm using this at present: <p title="Publication date" ></p> Works fine on screen, but Fangs/Jaws just reads it as "left bracket twenty-eight slash zero slash two thousand five fifteen colon...
36
by: Lindie | last post by:
The more I read the more confused I get. Too much on dates calulations in the groups. I need to know how often a book has been loaned out over the past year- 52 weeks. My table has Book...
8
by: Notgiven | last post by:
Say you have two dates, 2005-01-01 and 2005-01-24. I want to get a list or array or all the date between and including those two dates. I want to include this list in a query so I need it in a...
12
by: Dixie | last post by:
I am trying to calculate the number of workdays between two dates with regards to holidays as well. I have used Arvin Meyer's code on the Access Web, but as I am in Australia and my date format is...
5
by: DW | last post by:
I have a query in Access 2003 that has the following criteria SELECT tblOrder.SessionDate, tblMenus.Item_Name, tblOrder.Type, Format$(tblorder!SessionDate,"Short Time") AS SessionTime,...
3
by: Chung Leong | last post by:
Here's the rest of the tutorial I started earlier: Aside from text within a document, Indexing Service let you search on meta information stored in the files. For example, MusicArtist and...
14
by: MLH | last post by:
After entering a date (earlier than today's date) into a textbox control though, I'm stumped as to why VBA thinks date I enter into the control is greater than Now - when they are CLEARLY less than...
0
by: =?Utf-8?B?QnJ5YW4=?= | last post by:
Hello group. I've migrated from Win 2003 server to Win 2008 server. I've been banging my head agaist a wall for several days now trying to figure this out. I have the following script that will...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.