Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
bilionut
Contributor III
Contributor III

Load date from day field and folder name

Hi to everybody,

In a csv file like this:

InvoiceNo,     Day

123456,              1

123457,              5   

123458,              5

123459,             14

123460,             29

located in folders like

..\2011_01\sales.csv.

..\2011_02\sales.csv,

..\2011_03\sales.csv

etc...

I have only a column containing the day of invoice  (1,2,3, ... 31)

How can I load date column compose from folder name and Day field?

Thanks,

Ionut

2 Replies
Not applicable

Lonut:

When you load the file you can use fileDir() function to get the filepath. On this apply string functions like keepchar() to keep only year and month to get Year and month.

Next use date#() to for converting the string and day field into a date field.

Kiran.

bilionut
Contributor III
Contributor III
Author

Thanks Kiran for your reply. I try to do as you said.

Ionut