CoderZone.org

Category: >> PHP Code >> Convert Minutes to Days, Hours, and Minutes Bookmark and Share

<< lastnext >>

Snippet Name: Convert Minutes to Days, Hours, and Minutes

Description: Simple way to convert minutes to human readable Days, Hours, and Minutes.

Also see:
» Calculate days between any two dat...
» Resize and convert an image to a P...
» Convert text to image in php
» Get Unix Timestamp for midnight to...
» Convert Unix time string to a date...
» Convert Dollars And Cents Value to...
» LDAP Timestamp Converter
» Time left In Weeks, Days, Hours, A...
» BR2NL Function - Opposite of NL2BR
» Get Relative Dates and Times
» Convert Seconds to Hours:Minutes:S...
» Convert UK Dates To mySQL Format D...
» Measure script run time
» Convert miles to feet, feet to mil...
» Calculate the difference between t...
» FUNCTIONS: date/time
» USER idle time
» Get Date 30 days ago
» TO_TIMESTAMP_TZ
» TO_TIMESTAMP
» TIMESTAMP_TO_SCN
» SCN_TO_TIMESTAMP
» TIMESTAMP: TZ_OFFSET
» TIMESTAMP: TRUNC
» TIMESTAMP: SysTimeStamp
» TIMESTAMP: SYS_EXTRACT_UTC
» TIMESTAMP: SessionTimeZone
» TIMESTAMP: LocalTimestamp
» TIMESTAMP: FROM_TZ

Comment: (none)

Author:
Language: PHP
Highlight Mode: PHP
Last Modified: January 28th, 2011

$minutes = 550;
 
$day = floor ($minutes / 1440);
$hour = floor (($minutes - $d * 1440) / 60);
$min = $minutes - ($d * 1440) - ($h * 60);
 
// output text as...
 
print "{$minutes}minutes equals: {$day}days {$hour}hours {$min}minutes";
 
There haven't been any comments added for this snippet yet. You may add one if you like.  Add a comment 
© coderzone.org | users online: 6