// Earlier = -1, // Later = 1, // TheSame = 0 DateTime EXPIRE_END_DATE = DateTime.Parse("2019-10-14 01:00:00"); if (EXPIRE_END_DATE.CompareTo(DateTime.Now) < 0 ) { // "已過期!!" }else if (EXPIRE_END_DATE.CompareTo(DateTime.Now) == 0 ) { // "日期時間一樣" }else if (EXPIRE_END_DATE.CompareTo(DateTime.Now) > 0 ) { // "未過期!!" }
沒有留言:
張貼留言