• richardmgreen1 (8/23/2016)


    There's no issue with the file still being in use while trying to copy it as the filename ends with ****tmp.csv while it's still being written. When the "tmp" section is removed, the file is complete.

    I'll have a look at the COMPARE method and see if that gets around my issue and let you know.

    ::edit::

    Just noticed it needs a full date/time, whereas I only want to compare the times.

    Do you know if this will still work?

    Yup it will work, you have to build your known Date portion for this.

    Something like this :

    DateTime dt11AM = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 11, 0, 0);

    if (DateTime.Now < dt11AM)

    Console.WriteLine("It's not 11 AM yet");

    else

    Console.WriteLine("It's past 11 AM");