我有一GetOrders
门课,要求我提供开始日期和结束日期作为DateTime
值。不过,当我提供日期时,我收到以下错误消息:Sorry, the end date was missing, invalid, or before the start date. <EndDate> must be in YYYY-MM-DD or YYYY-MM-DD HH:MI:SS format, and after the start date.
这是我的代码:
ff.GetOrders(DateTime.UtcNow, DateTime.UtcNow.AddMonths(-1), TradingRoleCodeType.Buyer, OrderStatusCodeType.Completed);
当我尝试使用格式化字符串时,它不起作用:
String dt1 = DateTime.UtcNow.ToString("yyyy-MM-ddTHH:mm:ssZ");
String dt2 = DateTime.UtcNow.AddMonths(-1).ToString("yyyy-MM-ddTHH:mm:ssZ");