DateTime old file date base for current time???

Posted on 2006-05-14
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);
Question by:kvnsdr
    LVL 7

    Expert Comment

    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?
    LVL 19

    Accepted Solution

    DateTime count = oldTime.AddMinutes(-10);
    LVL 1

    Author Comment

    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..........

    Featured Post

    Course: Create Mobile App Prototypes with Adobe XD

    This is a project-based course: we go through all the steps of creating a prototype from start to finish, using all the tools and features currently available in Adobe XD. You can complete the course in less than a day, plus all project files and fonts are included.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    isEverywhere  challenge 19 49
    java continue statement 10 52
    Path of Workbook 3 30
    java  and programming certification ? 4 31
    This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
    Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
    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 …
    In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

    728 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

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now