Click here for important information about

Help on Julian Dates conversion

September 16, 2010 at 12:57:51
Specs: Windows 7
If have a .txt documents that has jullian dates like these:


is there a way to create a batch file the will read the data of this .txt
and convert them into regular dates with "" in them next to them automatically.

For example:

The new .txt will have

2006090 "3/31/2006"
2006091 "4/1/2006"
2006092 "4/2/2006"

See More: Help on Julian Dates conversion

September 16, 2010 at 14:25:35
VBScript would be easier.
Set fso = CreateObject("Scripting.FileSystemObject")
Set out = fso.CreateTextFile("new .txt", True)
With fso.OpenTextFile("this .txt")
  Do Until .AtEndOfStream
    line = Trim(.ReadLine)
    d = DateSerial(Left(line, 4), 1, Right(line, 3))
    out.WriteLine line & " """ & d & """"
End With

Report •

September 16, 2010 at 16:22:43
sry forgot to include that the .txt has a .png at the end


tried it will it and it does not work

Thanks again for your help!!!!

So again it should say

2006090.png " 3/31/2006"
2006091.png "4/1/2006"
2006092.png "4/2/2006"

Report •

September 17, 2010 at 07:33:25
tried it will it and it does not work
Of course not. The script wasn't designed for that input. It wouldn't work if you fed it US' Declaration of Independence, either.

Are there any other factors/different input you're forgetting to mention?

Report •

Related Solutions

September 17, 2010 at 09:42:25
managed to get it to work by using a batch file to remove the .png in them then running the script. When done I revert back to it. Thanks again for the help I really appreciate it. Now trying to figure out how to put all these batch file together rather than having 4 separate .bat and clicking on each of them so I can get to the other.

Report •

Ask Question