纽威
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
580 B

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace ICSSoft.Common
  7. {
  8. public static class SystemHelper
  9. {
  10. #region DateTime
  11. public static string GetDateNowString(string format = "yyyy-MM-dd HH:mm:ss")
  12. {
  13. return DateTime.Now.GetDateString(format);
  14. }
  15. public static string GetDateString(this DateTime dateTime,string format = "yyyy-MM-dd HH:mm:ss")
  16. {
  17. return dateTime.ToString(format);
  18. }
  19. #endregion
  20. }
  21. }