What if your database server doesn't let you format dates the way you want? Fortunately, there are several useful libraries that can help.
In Perl, you can use date-oriented modules. Date::Manip will parse dates in a bewildering variety of formats, and can perform many types of manipulations. Other modules, such as Date::Format and Date::Calc may be of interest as well. These modules can be found at www.perl.com/CPAN/modules/by-module/Date.
Users of Python can look at the mxDateTime module. This useful module includes constructors for various date types, methods for formatting dates, and data types for measuring date spans. You can find the mxDateTime module at starship.python.net/~lemburg/mxDateTime.html.
In Java, you can use the
java.util.GregorianCalendar class to manipulate specific components (day, week, year, and so on) of a
Date object. Also, the
java.text.SimpleDateFormat class can parse or format dates for the current locale.
PHP includes a number of date-manipulation functions, which are documented in section XIII of chapter IV of the PHP manual (www.php.net/manual). C programmers can turn to the
Date object. This article can be found at developer.iplanet.com/viewsource/goodman_dateobject.html.