Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
lmit
Creator II
Creator II

Date format

Hi all,

in my input files I have a date format like below

”Mon May 09 40:00:00 IST 2022”

I want my output file date format as

yyyy -MM-dd

2022-05-09

i tried with parse and format date but getting output as

2022-05-10

i tried with extracting date by using getpartofdate method but still getting one day ahead

can someone suggest logic where timestamp and time zone are not taken into consideration

really appreciate any help

thanks in advance,

lmit

Labels (2)
1 Reply
Anonymous
Not applicable

Hello @none none​ I can reproduce the same issue as you by using TalendDate.parseDate("EEE MMM dd HH:mm:ss z yyyy","Mon May 09 40:00:00 IST 2022") in the talend job

 

the problem is the HourOfDay (valid values 0 - 23): 40 in the input date string "Mon May 09 40:00:00 IST 2022” is invalid.

 

so please make sure that the data entered is correct, it work as expected if using a correct date string like "Mon May 09 20:00:00 IST 2022"

 

Best regards

Aiming