Change Date Snippets


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

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

Change Graphics Based on Season

18 February, 2011   

Change Graphics Based on Season

This PHP script will get the day of the week from the server date and then display an image (jpg or gif) to match.

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

21 January, 2011   

Sometimes the time set on your server isn't accurate to what your local time is. If you can't change it, you can adjust it yourself. If your server thought it was 12 midnight, but it was really 7 pm, this will roll the $today variable back five hours to be correct.

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

13 November, 2012   

Use this snippet to let your visitors change the background color of your Web page. Combined with a cookie, the setting could follow them through your whole site.

03 August, 2013   

Example shows bash code to change CWD to file's directory

30 April, 2011   

Countdown to the start of Summer in the Northern Hemisphere: June 21, 2011; 1:16 PM Eastern Daylight Time (EDT)

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.

16 March, 2013   

CSS code example to change Text Selection Color

07 April, 2012   

CSS code to change Text Selection Color

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.