time

×

Error message

Warning: apc_store(): Potential cache slam averted for key 'www.hashbangcode.com::cache_bootstrap::variables' in DrupalAPCCache->set() (line 206 of /var/www/www.hashbangcode.com/2014-03-22-2105/docroot/sites/all/modules/contrib/apc/drupal_apc_cache.inc).
time

Converting To And From Decimal Time In PHP

Monday, November 29, 2010 - 14:00

To convert a time value into a decimal value representing the number of minutes can be useful for certain calculations. The following function takes a time as a string of hh:mm:ss and returns a decimal value in minutes.

Category: 

Advanced Use Of PHP Function strtotime()

Saturday, September 19, 2009 - 23:17

Finding the next day of the week from a given date can involve some complicated loops and if statements. In PHP it is made quite easy through the use of the strtotime() function. This function, which is part of the PHP core since version 4, can take just about any string representation of the time and convert it into a Unix timestamp.

Category: 

Convert A String To A Date Value In MySQL

Tuesday, April 21, 2009 - 14:49

There are numerous ways to print out dates and times, and many hours of programming are spent in converting dates from one format to another.

To do this in MySQL you use the STR_TO_DATE() function, which has two parameters. The first parameter is the time to be parsed and the second is the format of that time. Here is a simple example that converts one date format to a MySQL formatted date string.

Category: 

Time Calculator In PHP

Wednesday, June 18, 2008 - 09:54

Use the following function to work out how long it has been since an event in years, months, weeks, days, hours, minutes and seconds.

Category: