Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Need help on this matter.
I have INPUT file contains unformatting date & time as below:
020717001200What i want is to format this date & time to by inserting '/' and ':' to another OUTPUT file and the data will be like this:
17/07/0200:12:00
Please..soebody help me.
Thanks in advance
rohaza

In Win9x, this should do it:
===== BATCH SCRIPT BEGIN =====
@echo off
if "%1"=="GoTo:" %1%2
echo e100'SET %%1='> %TEMP%.\T.BAT
for %%? in (rcx 7 w q) do echo %%?>> %TEMP%.\T.BAT
type %TEMP%.\T.BAT |DEBUG %TEMP%.\T.BAT > nul:: Set INPUT file below (you might use %1)
type INPUT.EXT>> %TEMP%.\T.BATcall %TEMP%.\T.BAT VAR
echo ; |CHOICE /c;%VAR%; call %0 GoTo: parse;> %TEMP%.\T.BAT
for %%? in (call del) do %%? %TEMP%.\T.BAT:: Set OUTPUT file below (you might use %2)
echo %VAR%> OUTPUT.EXTset VAR=
goto eof
:parse
for %%? in (1 2 3) do SHIFT
set VAR=%5%6/%3%4/%1%2%7%8
for %%? in (1 2 3) do SHIFT
set VAR=%VAR%:%6%7:%8%9
:eof
===== BATCH SCRIPT END =====Watch out for line wrapping!
Read commented lines. Just for making things clear: if the INPUT file contains:
0123456789ABC
The OUTPUT file will contain:
56/34/1278:9A:BC
-- Leonardo Pignataro - Secret_Doom --
secret_doom@hotmail.com
www.batch.hpg.com.br

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |