Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
次の日付を取得するにはどうすればよいですか。
この理由は、すべてのユーザー作成日を比較して、ユーザーが過去 3 週間以内に登録したか、昨年に登録したかを確認したいからです。
C# ASP.NET Web サイト。
前もって感謝します。
過去3か月
DateTime threeMonthsAgo = DateTime.Now.AddMonths(-3)
去年
DateTime oneYearAgo = DateTime.Now.AddYears(-1)
DateTime次に、インスタンスをと比較できますDateTime.Now。
DateTime
DateTime.Now