FULLSCREEN CONTENTS Project Home Page
.EXAMPLE.....: 45 Get information about the month prior to the current month
.ALIAS.......: 45
.CATEGORY....: examples 
.CODE........:

COMMENT
When running a monthly backup job at the beginning of the month, one often
needs to identify the previous month, or the last day of the previous
month.  Here's how to use Fdate to obtain that sort of information.
Basically, we subtract one day from the first day of the current month,
giving us the last day of the previous month.
=======================================================================
@echo off
cls

:: The simplest way to get information about last month is to subtract

:: 1 day from the first day of this month ...

fdate /fsub /n1 /att-01-tttt /omm   /p"Last month was.................: "
fdate /fsub /n1 /att-01-tttt /occyy /p"Last month occurred in the year: "
fdate /fsub /n1 /att-01-tttt /odd   /p"The last day of last month was : "
fdate /fsub /n1 /att-01-tttt /od1   /p"The last day of last month was : "