Getting current date in a batch dxl file

Hey I have a batch file which opens a dxl script which then writes the data to an excel sheet.
I am also writing the current date ( taken from the system) onto excel.
I am using followin for obtaining the date:

Date dim = today;
Locale loc = userLocale
string format = "dd.MM.yyyy"
string dated =stringOf(dim,loc,format)

Problem is it is working fine if I am running the dxl script directly. But when I run it through batch file it gives the following error:

Format already declard in scope
incorrect arguments for stringOf
incorrectly concatenated tokens
what might be the problem?

or is there any other way around?
archit12 - Tue Jul 03 11:53:05 EDT 2012

Re: Getting current date in a batch dxl file
llandale - Tue Jul 03 15:37:00 EDT 2012

It appears the Batch startup already declares variable "format". Change the name of your variable and it should work.

-Louie