How to get Last modified date from tfileProperties

Highlighted
One Star

How to get Last modified date from tfileProperties

Hello, I want to extract file's last modified date and month. I am using tFileProperties (mtime_string) column but what I get is the date and time of file's last reference(i.e. when my job refers to tFileList and the file ultimately therein.) I am not modifying the file in anyway from my job.
What I expect is ---- If the file is zipped on say 3rd May 2016 and my job is running on 5th May 2016 then I want last modified date of the file as 3rd May 2016. Plz note the file is zipped file. How can I achieve this ? I also tried using Java code as below but it gives the same result i.e date and time job is running :
// assuming the correct filepath is given 
Long lastModified = file.lastModified();
Date date = new Date(lastModified);
Moderator

Re: How to get Last modified date from tfileProperties

Hi,
Could you please take a look at a related forum:https://www.talendforge.org/forum/viewtopic.php?id=44049 to see if it works well for your use case?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

APIs for Dummies

View this on-demand webinar about APIs....

Watch Now