?
Solved

DateTime old file date base for current time???

Posted on 2006-05-14
3
Medium Priority
?
264 Views
Last Modified: 2010-04-17
I need to use the oldTime to base a countdown timer. However the oldTime is over 2 years old and I need a current file date to base my timer on. As is, it adds minutes on to an old file date, but it will always be a negative number.

DateTime oldTime = File.GetCreationTime(fileName);

DateTime count = oldTime.AddMinutes(10);
0
Comment
Question by:kvnsdr
3 Comments
 
LVL 7

Expert Comment

by:Clever_Bob
ID: 16679531
Can you explain this a little but further please kvnsdr?

I'm not sure you have accurately defined the problem or your output requirements.

Are you using SQL Server? Which language are you using?
0
 
LVL 19

Accepted Solution

by:
Fahad Mukhtar earned 1500 total points
ID: 16680070
try
DateTime count = oldTime.AddMinutes(-10);
0
 
LVL 1

Author Comment

by:kvnsdr
ID: 16682309
VS .NET C# WinApp:

The idea is to reference an OS system file date that cannot be changed as a base for a countdown timer for Trialware.

You could always make a file to reference upon initial program installation, but the end user could easily change the file, thus extending the Trialware period.

also, (-10) did not make a difference, thanks though..........
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Screencast - Getting to Know the Pipeline

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question