Skip to main content

Hi,

I have a image folder (.TIF) which the structure MODIS_2017001.tif, MODIS_2017009.tif, MODIS_2017017.tif,...

My target want to convert julian calender to YYYYMMDD.

For example : MODIS_2017001 -> MODIS_20170101; MODIS_2017009 -> MODIS_20170109; MODIS_2017017 -> MODIS_20170117

Could you tell me how to the way to make it?

Thank you

How did you determine that the source dates (2017001, 2017009, 2017017) belong January?

 

 


How did you determine that the source dates (2017001, 2017009, 2017017) belong January?

 

 

Yes. I use julian calender 2017 to compare. I have a excel file colums : 001 -> 0101, 009 -> 0109...

Hi @hoa_le, do you perhaps mean "day of year" (001-365 or 366 in a leap year)? If so, you can convert the date format from "YYYYDDD" to "YYYYMMDD" with the DateTimeConvertor.

  • Input Format: %Y%j
  • Output Format: %Y%m%d

Hi @hoa_le, do you perhaps mean "day of year" (001-365 or 366 in a leap year)? If so, you can convert the date format from "YYYYDDD" to "YYYYMMDD" with the DateTimeConvertor.

  • Input Format: %Y%j
  • Output Format: %Y%m%d
Yes. But if my file structure: MODIS_2017001_h28v07.

 

When I use DateTimeConvertor, I have to use SubstringExtractor to extract date (2017001) and extract string and create new attribute as figure but It writes to 3 files.

 

It seems SubstringExtractor is not corectly.

 


Hi @hoa_le, do you perhaps mean "day of year" (001-365 or 366 in a leap year)? If so, you can convert the date format from "YYYYDDD" to "YYYYMMDD" with the DateTimeConvertor.

  • Input Format: %Y%j
  • Output Format: %Y%m%d
If the input string always consists of three parts separated by underscore, you can split it and save the parts into a list (e.g. "_list{}") with the AttributeSplitter, convert the date format of the middle part ("_list{1}") with the DateTimeConverter, then concatenate the three elements of the list with the ListConcatenator.

 


Hi @hoa_le, do you perhaps mean "day of year" (001-365 or 366 in a leap year)? If so, you can convert the date format from "YYYYDDD" to "YYYYMMDD" with the DateTimeConvertor.

  • Input Format: %Y%j
  • Output Format: %Y%m%d
This screenshot illustrates my intention.

 


This screenshot illustrates my intention.

 

Thank you so much @takashi

 

 

 


Reply