创建发票时的日期格式 [英] Date format when creating invoice

查看:127
本文介绍了创建发票时的日期格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试使用REST API创建发票时,出现验证错误,例如:

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)

我尝试使用2014-12-27T17:01:00Z,2014-12-27Z和其他数字,但是我总是遇到相同的错误.

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?

推荐答案

通过相同且仅对我有用的 格式"是

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

2014-12-27 PST

其中"z"是时区. -例如PST PDT GMT

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

这适用于Invoice中的所有日期-例如发票日期,到期日

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

高度.

这篇关于创建发票时的日期格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆