Archive

Posts Tagged ‘difference’

How To Know the Difference or Time Duration Between Two Dates in PHP

December 14th, 2009 Masino Sinaga No comments

Have you ever got difficulty when you want to calculate the difference or the time duration between two dates by using PHP? For example, the first date is ‘2009-12-01 11:12:13′, and the second date is ‘2009-12-04 14:15:16′, so the difference or the time duration between this two dates will give a result as: ‘3 Day(s), 3 Hour(s), 3 Minute(s), 3 Second(s).’. We will make the function in order to make you easy to implement this calculation in your PHP code. Please note that your date format must be in this order: ‘yyyy-MM-dd hh:mm:ss’ as possible, otherwise, this function will not work properly, I guess. Read more…

  • Share/Bookmark

How to Calculate Difference Between Two Dates Using VB6

September 1st, 2009 Masino Sinaga No comments

This following code will show you how to calculate difference between two dates by using Visual Basic 6. The calculation result will give you an output that contains of the difference between those two dates in format: Days, Hours:Minutes:Seconds. The both dates must be in complete format. For example: the first date is March 1, 2002 17:18:00, and the second date is September 1, 2002 09:42:30. After being calculated, then the output will give you the result as follow: 183 day(s), 16:24:30. It means: The difference between those two dates is: 183 days, 16 hours, 24 minutes, and 30 seconds. Read more…

  • Share/Bookmark