PDA

View Full Version : [SOLVED:] How to change the change the year from a vba code that convert date into .csv file



darchii
05-13-2015, 08:32 AM
Hello,
I have a script in VBA Outlook that convert my email into .csv file. The problem is I would like to add some changes and I would like to have your help, please.


'Split the fourth required line 'From' and 'Till' at the space

vCSV = Split(vText(lng_Para + 5), Chr(32))


'Add the 'From' time and date to the CSV string separated by semi-colons


strCSV = strCSV & vCSV(1) & Chr(59) & vCSV(2) & Chr(59)


'Add the 'Till' time and date to the CSV string separated by semi-colons


strCSV = strCSV & vCSV(5) & Chr(59) & vCSV(6)
This code is for the 5th raw from my email which is: "From 14:57 11-05-2015 GMT Till 18:57 11-05-2015 GMT"
And it will convert in something like:*;*;*;*;*;11:32;14-11-2014;15:32;14-11-2014;

I would like to change the year from 'Till' and add another 10 years for example and to be something like:
:*;*;*;*;*;11:32;14-11-2014;15:32;14-11-2024;

*; means others data that I convert.

Let me know if it is clear all above.