I realised it was nothing to do with the formatting, I just was not familiar with some of the dos commands! In any case I would try the following: ************** emw32 -d set s=%date:~6,4%%date:~3,2%%date:~0,2% emw32 -j"reports\jpg\%s%-temperature.jpg",600,400,75 -rtoday@00:00-1month,today@00:00 emw...