Hi All ,
The below command is not working properly with YYYY and the same is working good with yyyy
TalendDate.parseDate("MMM dd YYYY",TalendDate.getDate("MMM dd yyyy")
TalendDate.parseDate("MMM dd yyyy",TalendDate.getDate("MMM dd yyyy")
Can someone suggest the purpose of YYYY and when can i use and why it is giving invalid result.
since java is case sensitive so YYYY does not work for it.
The date format always has dd MM yyyy .
Let me know more about your requirement.
Here there is no requirement .both commands are working properly, but
YYYY is not giving correct result and yyyy is giving correct result,
may i know the reason why YYYY is not throwing error and giving junk value or any significance for YYYY
Well I have faced error saying : Invalid character near 'Y' , whenever I have used YYYY by mistake in my date formats instead of yyyy.
Like for exmaple, M is always capital and d is always small in a date format ,similarly y is always small. It will simply not work with capital Y because its something in-built in java, as far as my knowledge is concerned.
I wish I could help you more in this by seeing any screen-shot and figure out the exact issue. let me know if I can solve more.
"yyyy" stands for Year in Java Date. You can get date pattern from schema setting.
Please have a look at my screenshot.
yyyy is stands for year and wat about YYYY and why it is not throwing error.
YYYY is giving result which is not correct result and the result for YYYY is on what basis caluclated.
According to the Java docs, 'Y' represents "Week Year" which is slightly different from 'y'.
This stackoverflow article goes into more detail:
Thanks for sharing the related docs with us.