How to find 'last SUNDAY DATE'
through batch command?
what I was trying is
echo %date:~4,2%%date:~7,2%%date:~10,4%
this is good for current date but for last Sunday date... can anyone suggest any logic through batch.
How to find 'last SUNDAY DATE'
through batch command?
what I was trying is
echo %date:~4,2%%date:~7,2%%date:~10,4%
this is good for current date but for last Sunday date... can anyone suggest any logic through batch.
Windows PowerShell:
[DateTime]::Now.AddDays(-1 * [DateTime]::Now.DayOfWeek.value__)
Sorry the environment variable %date% in Batch (.bat) files sounds uneasy to do calculations.