# NOT RUN {
# getting the capturing date from the name of Sentinel-2 images
str <- c("S2A_MSIL1C_20170102T111442_N0204_R137_T30TWN_20170102T111441.SAFE",
"S2A_OPER_PRD_MSIL1C_PDMC_20160308T090616_R094_V20160305T110109_20160305T110109")
dt <- senGetDates(str)
print(dt)
print(format(dt,"%Y%j"))
senGetDates(str, format = "%Y%j")
# }
Run the code above in your browser using DataLab