Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

getCurrentDate() throwing an error

Hi,
using TalendDate.getCurrentDate()  and it throws this error:
Exception in thread "main" java.lang.IllegalArgumentException: Illegal pattern character 'T'
              at java.text.SimpleDateFormat.compile(SimpleDateFormat.java:826)
              at java.text.SimpleDateFormat.initialize(SimpleDateFormat.java:634)
              at java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:605)
              at java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:580)
              at ingestionpipeline.testflow_0_1.TestFlow.runJobInTOS(TestFlow.java:1912)
              at ingestionpipeline.testflow_0_1.TestFlow.main(TestFlow.java:1759)


Can't even get it to compile, and yes this is in a date field.
thanks,
Bob

Labels (2)
2 Replies
Anonymous
Not applicable
Author

I would be surprised if this is coming from getCurrentDate(). Are you sure it's not from some other logic in your Job. Have you got the full stack trace?
If your Job won't compile, you should be taking a look at the code window to see where the issue lies.
Anonymous
Not applicable
Author

I recreated in a job, that does nothing but sticks the date and a pk into MySQL table using a tfixedFlowinput and tMysqlOutput.
The schema was imported, and the field is datetime on mysql. 
If I use this: TalendDate.parseDate("yyyy-MM-dd hh:mm:ss","9999-01-01 12:12:12");
Then it works.