Now
Formula |
Description |
Result |
NOW() |
Returns the current date and time. |
11/6/2011 19:03 |
NOW()-0.5 |
Returns the date and time 12 hours ago (-0.5 days ago). |
11/6/2011 7:03 |
NOW()+7 |
Returns the date and time 7 days in the future. |
11/13/2011 19:03 |
NOW()-2.25 |
Returns the date and time 2 days and 6 hours ago (-2.25 days ago). |
11/4/2011 13:03 |
Date
Encode a date
Date(Year, Month, Day)
Time
Encode a Time
Time(Hour, Minute, second)
Year
Data |
|
|
Date |
|
|
7/5/2008 |
|
|
7/5/2010 |
|
|
Formula |
Description (Result) |
Result |
YEAR(A3) |
Year of the date in cell A3 (2008) |
2008 |
YEAR(A4) |
Year of the date in cell A4 (2010) |
2010 |
Month
Date |
|
|
15-Apr-11 |
|
|
Formula |
Description |
Result |
MONTH(A2) |
Month of the date in cell A2 |
4 |
Day
Date |
|
|
15-Apr-11 |
|
|
Formula |
Description (Result) |
Result |
DAY(A2) |
Day of the date in cell A2 (15) |
15 |
Hour
Time |
|
|
0.75 |
|
|
7/18/2011 7:45 |
|
|
4/21/2012 |
|
|
Formula |
Description |
Result |
HOUR(A2) |
Returns 75% of 24 hours |
18 |
HOUR(A3) |
Returns the hour portion of the date/time value. |
7 |
HOUR(A4) |
A date with no time portion specified is considered 12:00 AM, or 0 hours. |
0 |
Minute
Time |
|
|
12:45:00 PM |
|
|
Formula |
Description |
Result |
MINUTE(A2) |
Minute portion of the time in A2. |
45 |
Second
Data |
|
|
Time |
|
|
4:48:18 PM |
|
|
4:48 PM |
|
|
Formula |
Description |
R esult |
SECOND(A3) |
Seconds in the first time (18) |
18 |
SECOND(A4) |
Seconds in the second time (0) |
0 |