Hi,
We have a Job that calls a SSIS package 2005 that does some processing and execute a BAT file. This Job is being called by a web application.
The BAT file creates a folder and named it based on the current date ( YYYY_MM) e.g 2015_07
echo %date:~10,4%_%date:~4,2% md %date:~10,4%_%date:~4,2% pause exit 0
It was working okay in the SQL Agent 2005 server until we moved to the new server SQL Agent 2012 using the same package SSIS package 2005.
Now the issue is, instead of creating the folder based on YYYY_MM, it's now being created as YYYY_DD.
I've checked the Regional settings of both server and they have the same "ENGLISH (United States) format. I even ran the code below and they're returning the same output
echo %date:~10,4%_%date:~4,2%
I know the BAT file can be improved by not depending current locale in WINDOWS, but I just want to understand how this issue occurs and how does the regional setting being overridden?
Many thanks.
- Edited by Vinxster 2 hours 12 minutes ago