473,388 Members | 1,097 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

subtract time. Day is same

How can i subtract time? the day remains the same. i just need to subtract two time.

Date = 2011-04-26 Starttime = 12:39:53 Endtime = 14:34:28

now i need to calculate the time difference between Endtime and Starttime.

Apr 26 '11 #1
1 1460
8,658 Expert Mod 8TB
which PHP version do you have? as of PHP 5.3 you can use PHP’s date classes, otherwise you would have to convert via strtotime() and date().
Apr 27 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

by: rbt | last post by:
I'm using the standard NTFS file system. The only time the access time is updated is when the file is modified or saved (with no changes). What's up with that? Shouldn't a read/view update the...
by: Chanchito | last post by:
hi there, I am seeking some guidance in regards to creating a query. I would like to be able to have the query display records that have had a certain amount of time pass since the time that is...
by: Martin Ho | last post by:
I have a small application which is running every x minutes and I need to display remaining time on the screen in this format (example): "Next start will be in: 00:13:25" , and it should...
by: Max | last post by:
This is a follow-up on my previous thread concerning having the program wait for a certain date and time and then executing some code when it gets there. My question is; can I use the Sleep...
by: Cylix | last post by:
I have set white color as the transparent key of my form, It show properly. After I chnaged the opacity of the form, The white color is shown, how can I make the form with this two effect? That...
by: Arne Gemsa | last post by:
Hi, I want to get a starttime. To get this I have to subtract the runtime from a unit e.g. 08:40:15 from a date e.g. 2007-03-29 16:48:30. So the starttime is 2007-03-29 08:08:15. Is there any...
by: electroon | last post by:
Hi frnds, I have written a code to get current time struct tm *locTime; time_t currentTime; time( &currentTime ); locTime = localtime(&currentTime ); Suppose now i get output time as...
by: barronmo | last post by:
I'm trying to get the difference in dates using the time module rather than datetime because I need to use strptime() to convert a date and then find out how many weeks and days until that date. ...
by: amanjsingh | last post by:
Hi, I have a Database (MSSQL) with some tables having multiple Time columns (which I imported from some Access DB). The DateTime format in the MSSQL is 1899-12-30 02:30:00.0 format. I populate...
by: prigupta2 | last post by:
i want to type Alphabets and numbers in text box in such a way first alphabets then number ex C102 M458 only CM0123456789 please provide code in vb6.0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.