IcsFromERPJob
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.

20 lines
512 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.FromERP.Extension
  7. {
  8. public static class CommonExt
  9. {
  10. /// <summary>
  11. /// 日期转时间戳 , 精确到毫秒
  12. /// </summary>
  13. /// <returns></returns>
  14. public static long ToMillisecondsTimeStamp(this DateTime dateTime)
  15. {
  16. return (dateTime.ToUniversalTime().Ticks - 621355968000000000) / 10000;
  17. }
  18. }
  19. }