Date format when creating invoice

▼魔方 西西 提交于 2019-12-24 05:16:13

问题


When I try to create invoice using REST API I get validation error like:

"details":[{"field":"items.date","issue":"only date field allowed with (yyyy-MM-dd z) format. (was 2014-12-27T17:01:00Z)

I tried with 2014-12-27T17:01:00Z, 2014-12-27Z, and number of others, but I get always the same error.

What kind of format should date be? Can you give me an example?


回答1:


Went through same and the only "format" that worked for me is

2014-12-27 PST

where the "z" is a time zone. - e.g. PST PDT GMT

This goes for all dates in the Invoice - e.g. invoice date, due date

Hth.




回答2:


I had the same issue and this worked for me in PHP date('Y-m-d\TH:i:s\Z',$invoiceDate)



来源:https://stackoverflow.com/questions/27669961/date-format-when-creating-invoice

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!