What is the appropriate date format for query in activiti-rest calls?
I keep getting the error below, and i have tried, different date formats.
{"errorMessage":"The given value for query-parameter 'startedAfter' is not a valid date: 2013-04-03T23:45Z","statusCode":400}
Below are the date formats i have tried:
startedAfter=2013-04-03T23:45Z
startedAfter=2009-01-08
startedAfter=2009-01-08T00:00:00+01:00
I got the solution.
On Activiti Forum: http://forums.activiti.org/content/rest-api-task-query-due-date-dueafter-duebefore-error
Accepted date format is "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"
Thanks.
Example for the date format to be used is as below -
2020-09-02T16:42:11+05:30 for activiti 6
Related
I've date in dd-mm-yyyy format, I need the date in yyyy-mm(month) format. I'm using postgresql.
Thanks in advance.
date values don't have any format. Any formatting you see is applied by your SQL client. To turn a date into a string with a specific format, you can use to_char()
to_char(the_column, 'yyyy-mm')
I am a newbie to OreintDB and I was wondering if there is a way to get OrientDB (I am using the 3.0 Release Candidate) to accept all dates as ISO 8601 compliant dates with milliseconds. The DB I am building will store all times in UTC but needs millisecond level timestamps.
Try this:
ALTER DATABASE DATETIMEFORMAT "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"
Hope it helps
Regards
I m having some issues with converting a regular timestamp in cassandra with Apache Nifi.
My use case is following:
I have a csv file with a date in it looking like this ('2015010109') and I want to put it in cassandra by converting this string ('2015010109') to an proper format: 2015-01-01 09:00 -> yyyy/MM/dd HH:mm (I dont exactly need the minutes, but I guess it is more useful for later usage)
So far I got this propertie in my UpdateAttribute processor when trying to convert this string to a timestamp:
date : ${csvfiledate:toDate("yyyyMMddHH","GMT"):format("yyyy-MM-dd-HH")}
but then there is an error occuring in my PutCassandraQL processor: Unable to coerce '2015-01-01-09' to a formatted date (long).
I tried something along
date : ${csvfiledate:toDate("yyyyMMddHH","GMT"):format("yyyy-MM-dd HH-mmZ")} aswell, but the same error is occuring.
It seems like you need to have a specific timestamp type for cassandra as you can see here:
http://docs.datastax.com/en/archived/cql/3.0/cql/cql_reference/timestamp_type_r.html
But it isnt working so far, maybe you got some tipps.
Thanks in advance.
You've got it backwards..
toDate parameters are used to describe how to parse the date. format function is used to describe how the date output should be. So the expression should be:
${csvfiledate:toDate('yyyy-MM-dd-HH','GMT'):format('yyyyMMddHH')}
There are two date columns in Teradata table with following definition.
Date1 DATE FORMAT 'DD-MM-YYYY'
Date2 DATE FORMAT 'DD-MM-YYYY'
As you can see, the format of the date is same for both the columns.
The values I see in Teradata SQL Assistant are different for Date1 & Date2 ...
For Date1 it is shows as MM/DD/YYYY
For Date2 it is shown as DD/MM/YYYY
Also, due to this, EXTRACT(MONTH FROM Date...) is not working same for both the columns.
Please note: Date2 column is updated by me with values like '04-28-2016' i.e. 'MM-DD-YYYY'. And this is to acheive the Date1 format as shown in SQL Assistant.
Can you please let me know where I made a mistake ?
Any advise would be helpful.
Thanks,
The FORMAT is used for casting from/to a string, but SQL Assistant uses the format specified under Tools -> Options -> Data Format -> Display dates in this format. And a DATE is stored in an internal format, thus EXTRACT is independent of the it.
Btw, the only recommended way to write a date is Standard SQL's DATE '2016-04-28'
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)