Add character to text in CSV

February 9, 2011 at 08:07:53
Specs: Windows XP
Hi, I'm a newbie in batch script. I need batch script to solve my problems. I have problems about my csv file .
The CSV file have 17 column but I have problems in column 1

Column 1 is about Date. It has mm.dd.yy but I want it to be mm.dd.yyyy
such as 11.02.09 I want it look like 11.02.2009 (I think it must add 20 before 09)

How could I do please help. Thank you for you kindness.


See More: Add character to text in CSV

Report •

#1
February 9, 2011 at 12:28:46
Try this..It should work..


@echo off & setlocal enabledelayedexpansion
for /f "tokens=1,* delims=," %%a in (csv.csv) do (
for /f "tokens=1,2,3 delims=." %%t in ("%%a") do (
set dt=%%t.%%u.20%%v
)
echo proecessing !dt!,%%b
echo !dt!,%%b >>New.csv
)

Subhash Chandra.
www.s-chandra.co.cc


Report •

#2
February 10, 2011 at 10:58:07
Thank you for your reply and your kindness.
It's work and good solution to use with my work.

Thank you very much indeed

^--^


Report •
Related Solutions


Ask Question