ever changing column name based on dates

Y

yann

Dear all

I am writing a program to import some .csv files as the source data for my tables. The 1st row of the .csv file contains the field name (column name). The problem is the some of the column names are based on date. e.g 2004M01 (to represent data for january, 2004) and 2005M01 (represent data for january, 2005). Come next year the column name will become 2005M01 and 2006M01
As I need to do some calcuations of the data in the table based on the column names, is there anyway i do not need to change my codes every year to change the column name used for the calculations?
The hardest part of this problem is that the column names for the calculated data to be exported into Excel should maintain its original form: 2004M01 and 2005M01

Please help if possible. Thanks in advance

b. regard
yann
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top