2年の時差を比較したい。
public const long TwoYears = 2 * 365 * 24 * 3600;
string currTime = DateTime.Now.ToString("yyyyMMddHHmmss");
string recordTime = fileName.Split('_','-').Last();// format is 'yyyyMMddHHmmss'
long diff = (long.Parse(currTime)) - (long.Parse(recordTime));
if (diff < TwoYears)
Console.WriteLine(fileName);
私はそれを正しくやっていますか?