FunGetDate.cs 570 B

123456789101112131415161718192021222324
  1. using System;
  2. using IwbZero.Expr;
  3. using IwbZero.ToolCommon.StringModel;
  4. namespace IwbZero.ExprFunctions.Functions
  5. {
  6. /// <summary>
  7. /// 获取日期
  8. /// </summary>
  9. public class FunGetDate:IIwbFunction
  10. {
  11. public string Invoke(ExprObject exprObj)
  12. {
  13. string result = DateTime.Now.DtToDateStr();
  14. if (exprObj.ChildCount > 0)
  15. {
  16. DateTime dt = exprObj.GetChild(0).Expr.StrToDt();
  17. result = dt.DtToDateStr();
  18. }
  19. return result;
  20. }
  21. }
  22. }