We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

in excel how do I format the date like this 2011-04-21 06:00:00   for 50 hours from now ?

TIMFOX123
TIMFOX123 asked
on
Medium Priority
211 Views
Last Modified: 2012-05-11
I want my spreadsheet to format the date like this 2011-04-21 06:00:00
and I want one cell to be 50 hours from now

Another cell 2 weeks & 6  hours ahead

excell 2007 :)

Comment
Watch Question

>>> I want my spreadsheet to format the date like this 2011-04-21 06:00:00

Format(Range("A1").Value,"YYYY-MM-DD HH:MM:SS")

Sid
Oops and to Add time

=NOW()+"50:00:00"

and for

Another cell 2 weeks & 6  hours ahead

=NOW()+"174:00:00"

Sid
If you are looking for a formula to format time then you can do this

=TEXT(A1,"YYYY-MM-DD HH:MM:SS")

or right click on the cell and click on format cells. The in Custom, Type

YYYY-MM-DD HH:MM:SS

Hope this helps.

Sid
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Commented:
"Format Cells" for the date fields and in the Number tab select Custom from the Category field then enter the following in the "Type:" field

yyyy-mm-dd hh:mm:ss

When manipulating Excel Date fields mathematically you need to know that 1=24hrs. So to add 50hrs to a date field you have to divide it by 24.

The formula for the 50+ hour field (using A1 as the original date field)

=A1+50/24

For 2 weeks 6 hours

=A1+14.25

Author

Commented:
this is a huge saver for a project I am doing
thx a bunch
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.