Cool Solutions

Fdate



By:

September 11, 2001 8:00 am

Reads:3,646

Comments:0

Score:Unrated

Print/PDF

License:
Free

Download fdate15a

Fdate is a utility for doing date formatting and date arithmetic in DOS batchfiles. There are a number of different ways to put Fdate’s output intoenvironment variables. Once this has been done, the environment variablescan be used and manipulated in many ways in the batch file.

By far the most popular use of Fdate is to put today’s date — in a particular format — into an environment variable. Here’s a list of Fdate functions:

  • accept user input from the keyboard
  • retrieve today’s date in a variety of formats
  • place today’s date into a file name
  • reformat dates
  • Output formats include common American and European formats, or you can “roll your own” by manipulating environment variables. Month and weekday names can be produced in several languages (English, French, German, Danish, Spanish).
  • calculate when certain holidays occur in a given year
  • do date arithmetic
  • determine the date N days before/after a given date
  • compare two dates to determine which is earlier
  • compare two dates to determine how many days apart they are
  • determine if a year is a leap year
  • determine whether a year is evenly divisible by some number
  • determine what day of the week a date falls on
  • run certain software only on certain days of the week
  • retrieve the date/time from the date/timestamp of a file
  • do simple integer arithmetic (add, subtract, modulus)
  • calculate the time a piece of software takes to run
  • convert a calendar date to/from a “business julian” date
  • extract a substring from an environment variable
  • right, left, or center justify a string

Uploaded by permission of the author as given in the FDATE.TXT fileincluded in this zip file.

If you find this utility useful, please send a note to the author.

0 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 5 (0 votes, average: 0.00 out of 5)
You need to be a registered member to rate this post.
Loading...


Categories: Uncategorized

Disclaimer: This content is not supported by Micro Focus. It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test it thoroughly before using it in a production environment.

Comment

RSS