DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: Difference between two files' time/date  (Read 13,063 times)

nkormanik

  • Participant
  • Joined in 2010
  • *
  • Posts: 563
Difference between two files' time/date
« on: August 26, 2013, 10:41 PM »
Here's the idea:  Window comes up with two sub-windows on left and right.

Drag a file to the inside left sub-window.

Drag another file to the inside right sub-window.

Click Okay.

Up pops amount of time (absolute) between the two files.  ('Modified' file time/date preferred.)

Thanks!
Nicholas Kormanik

c.gingerich

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 748
    • Participated in NANY Challenge Six Times
    • Coding Snacks
Re: Difference between two files' time/date
« Reply #1 on: August 27, 2013, 05:01 PM »
I think I can help you out. I should have something for you either later today or tomorrow.  ;)

c.gingerich

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 748
    • Participated in NANY Challenge Six Times
    • Coding Snacks
Re: Difference between two files' time/date
« Reply #2 on: August 27, 2013, 06:52 PM »
Just to make sure I am clear, when you say absolute, you me how much time between the file dates in days, hours, etc., correct?

nkormanik

  • Participant
  • Joined in 2010
  • *
  • Posts: 563
Re: Difference between two files' time/date
« Reply #3 on: August 27, 2013, 09:51 PM »
Fantastic, c.gingerich.  Yes, by "absolute" I mean it shouldn't matter which file is placed first or second, either can be newer or older, or the same.

Without absolute value, if newer file is placed first, the result would be a negative number.

I see no problem giving a negative number, if it makes programming any easier.  But I'm guessing most people would like to simply see a positive number (absolute value).

By the way, regarding my request here, I am primarily interested in the TIME difference between the two files.  In a single folder (subdirectory) output is being generated -- 16,000 files -- the whole process takes around three hours.  I'd like to be able to see that total time taken by using such a program as I request -- put in the first-created file, and the last-created file, press enter, presto, roughly total time of the entire process.

There is an initial file in that folder that is from a "pre-process," with an earlier time/date.  So simply grabbing the earliest date and the most recent date wouldn't give the desired answer.

Thanks a bunch!

c.gingerich

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 748
    • Participated in NANY Challenge Six Times
    • Coding Snacks
Re: Difference between two files' time/date
« Reply #4 on: August 28, 2013, 02:38 PM »
Here ya go. I hope it is what you requested. http://starpunch.blogspot.com/2013/08/comptime.html

Run CompTime.exe, drag and drop one file at a time (or browse for files) and the time difference will be automatically calculated and show in status bar at the botom of the window. You can keep changing the files by dropping or selecting and the difference will be automatically calculated each time. The time difference will be displayed in HH:MM:SS format only up to 24 hours difference in time.





« Last Edit: August 29, 2013, 01:36 PM by c.gingerich »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: Difference between two files' time/date
« Reply #5 on: August 28, 2013, 03:31 PM »
Since one might want to compare many files, it would be nice to not have to press a button and get a modal result.  I would think it would be preferable to have it autocalculate any time there are two files ready to be compared, and let user drag and drop to replace either.

c.gingerich

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 748
    • Participated in NANY Challenge Six Times
    • Coding Snacks
Re: Difference between two files' time/date
« Reply #6 on: August 28, 2013, 03:33 PM »
I didn't see your name on the original request. LOL  ;D

Sure I can do that, good idea.  :Thmbsup:

I'll try to do that today..... DONE!
« Last Edit: August 28, 2013, 03:56 PM by c.gingerich »

nkormanik

  • Participant
  • Joined in 2010
  • *
  • Posts: 563
Re: Difference between two files' time/date
« Reply #7 on: August 28, 2013, 11:00 PM »
Outstanding, c.gingerich.  Even better than what I had in mind.  A really useful tool.

Hope others, too, will be able to find this and put it to use.

Thanks so much!

c.gingerich

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 748
    • Participated in NANY Challenge Six Times
    • Coding Snacks
Re: Difference between two files' time/date
« Reply #8 on: August 29, 2013, 02:09 AM »
Thank you. I'm very happy you like it and it works the way (or better ;-) ) than you wanted! You are very welcome.

c.gingerich

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 748
    • Participated in NANY Challenge Six Times
    • Coding Snacks
Re: Difference between two files' time/date
« Reply #9 on: August 29, 2013, 01:36 PM »
Made an update to CompTime. After using it a bit I wanted the time difference to be shown larger so I increased the text size for easier reading. I also created a post for it on my site. You can download the most current version here. http://starpunch.blogspot.com/2013/08/comptime.html

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: Difference between two files' time/date
« Reply #10 on: August 29, 2013, 02:20 PM »
Just my normal reminder that if you appreciate the coding of someone on the site, you might consider sending them a donation (just click the gold coin at the bottom right under their name on the left).

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,947
Re: Difference between two files' time/date
« Reply #11 on: August 30, 2013, 12:14 PM »
Just my normal reminder that if you appreciate the coding of someone on the site, you might consider sending them a donation (just click the gold coin at the bottom right under their name on the left).

Understood mouser

Original address: https://www.donationcoder.com/forum/index.php?topic=35915.0