Convert time to milliseconds in Excel
I am trying to convert something in the following format to seconds.
Across the first row I have: Year, Month, Day, Hour, Minute, Seconds Sec开发者_JS百科ond row I have for example: 2011, 07, 06, 20, 37, 06
How would I convert this to a single cell that specifies the number of total seconds that number is equal to. Keep in mind that different months have different number of days.
Lets say you have your values in row 2 and your reference date in G1, then this formula
=((DATE(A2,B2,C2)+TIME(D2,E2,F2))-G1)*24*60*60
should give you the desired result
精彩评论