Date format when creating invoice - paypal

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?

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.

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

Related

How do I pull the week of the month from text strings in this Twilio format 2019-08-22 06:12:58 MDT?

I am using the Twilio log file to crunch some data and need to convert the Twilio format for dates into something that Google Sheets can recognize as a date so I can then extract what week of the month the date is referring to. Also would be helpful to get the syntax that converts the Twilio date to a recognizable date for Googlesheets in case there are other things I need to do with the date field.
Currently, this is the format in the log file: "2019-08-22 06:12:58 MDT"
I'm using this =text(index(split(I2," "),,1),"mmmm") to determine the month and am struggling to have this now be able to work with the WEEKNUM function of Googlesheets to get the number of the week the date is from. I've tried =DATE(index(split(I2," "),,1),"mmmm"), =WEEKNUM(index(split(I2," "),,1),"mmmm") but am terrible with the formula syntax and can't fix the date value.
=DATE(index(split(I2," "),,1),"mmmm")
I expect to see a value from 1-5.
The text() part of the formula is turning the date input into text. And so you can't use it to calculate the weeknum().
=weeknum(index(split(I2," "),,1)) will get you closer. But it will give you the week of the year.
You may want to see this for a way to get to week of the month from week in the year.

How to fix dates lagging one day behind in calendar

I'm developing a Clio integration with access to the calendar, but there's been an issue with dates. While the documentation says they expect an ISO-8601 timestamp date, it seems like there's something adding offset to the timezone value in dates being sent to the system.
For example, if I send a date 2018-05-17T23:59:59.999999-04:00 on both start_at and end_at properties when creating a calendar entry for an all day event, the value returned when fetching this entry through the API is 2018-05-17T17:00:00-07:00, which is clearly wrong. Am I missing something here?
The expected result should be something like either 2018-05-17T23:59:59-04:00 or 2018-05-18T03:59:59Z if milliseconds are ignored.
All dates are based on UTC timezone. Could it be that your site/server/script is set to a local timezone and so the dates are off for part of the day?
Try setting your scripting environment to UTC time before making any date/time-based queries.

Format of docker remote api image date created field

Just wondering who might know what the number on the "created" attribute of the json response for images might mean.
Obviously its something to do with the day of creation, but I'm not sure how to format it, it doesnt look like a standard timestamp, does it represent "days ago" or a specific date?
How can I format this?
eg Created: 1402148149
As was stated by #Melbourne2991 that is a UNIX timestamp. Seconds since the epoch of Jan 1 1970. However, you will find that the Docker API is inconsistent about how it reports dates. /containers/json will give you the created field for all the returned containers as a UNIX timestamp, but /containers/DOCKERID/json will give you the same field in ISO 8601 format. Just something to consider when writing your code.

Set icalendar date start and date end timezone

I'm using MVC4 to create ics files and sent them by mail. But i don't know how to set my DTSTART and DTEND timezone.
I know the problem is with the Z at the end
a.WriteLine("DTSTART:20150814T000000Z")
a.WriteLine("DTEND:20150814T110000Z")
I need to set it to GMT -6, Central America time or more especific Managua Nicaragua timezone.
Help please.
A line like this should do it:
DTSTART;TZID=America/Managua:20150814T000000
You officially also need to include a VTIMEZONE object with all the relevant timezone transition information for your timezone, but almost every client can work without that data

Date and timezone using j2me

I have a date string as input from an rss like:
Wed, 23 Dec 2009 13:30:14 GMT
I want to fetch only the time-part, but it should be correct according to the my timezone. Ie, in Sweden the output should be:
14:30:14
What is the best way? I want it to work with other RSS date formats as well if possible. Im using regexp right now but that is not very general.
Im having a hard time finding any library or support for dates and timezones in j2me?
/Br Johannes
In normal Java, I'd use a SimpleDateFormat object (that you create to match the pattern of the date you're getting in the RSS) to parse the String value and give you a Date object. Then, using a Calendar (which would be localized to your time zone), you'd be able to get the hour, minute, and second information.
I don't know j2me, but a google search suggests that these classes are available in j2me.