public override Value Execute(Args args, Environment environment, SourcePos pos) { if (args.IsNull("date")) { return(ValueNull.NULL); } var value = args.GetDate("date"); var date = value.AsDate().GetValue(); var fmt = args.HasArg("fmt") ? args.GetString("fmt").GetValue() : "yyyy-MM-dd HH:mm:ss"; return(new ValueString(date.ToString(fmt, DateTimeFormatInfo.InvariantInfo))); }