Date Calculation Snippets

31 December, 2011   

How to create a procedure for date calculation

Handy helper function which parses about any date and returns the same date in MySQL date/time format.

Scripts used to calculate Daylight Saving Time (DST) for the US and EU. Valid for years 1900 to 2099. [DST wasn't adopted until the 1950s-1960s for US and 1990s for the EU] By: brad degrandis

Change Date from dd/mm/yyyy to yyyy-dd-mm

Function of an integer raised in a power * and the calculation of the sum of a series of integers (1^e+2^e....+n^e) raised in a power.

03 November, 2011   

Here are some simple examples of using the functions with your variables. Run these from any ".asp" page and watch what happens

Function of an integer raised in a power * and the calculation of the sum of a series of integers

18 February, 2013   

Brute-force calculation of any date. Includes some very tricky rules for modern-day Gregorian calendar.

19 December, 2012   

How to convert a java util Date into a sql Date for use in databases.

19 December, 2012   

Example shown here how to convert String to Date in Java

19 October, 2011   

An example to check Weekend

23 January, 2013   

Returns the number of the quarter containing a given date.

15 February, 2012   

PHP code to displaying the current date in an HTML page.

20 February, 2012   

SQL select query to show records with specify date in where clause

09 October, 2011   

Example shows how to get the database date and time.

By default, Delphi gets its date/time, currency and numeric format from Control Panel's International settings. We can set the constants defined in Delphi, like DecimalSeparator, ShortDateFormat and others like in the code below. To a complete list of these variables, look at Currency and date/time formatting variables in Delphi Help.

26 December, 2011   

Example PHP code to navigate calender in HTML pages

Change Graphics Based on Season

18 February, 2011   

Change Graphics Based on Season

MySQL code example to calculate age from Date Of Birth