# Time Value

#### clares

##### Well-known Member
Hi All

Wondering if anyone can help me. I have a function in my workbook returning the current time. I am using =Now() and formatted the cell B9 to Time. The contents of the cell is 14:37:40. This is fine.

I am trying to use VBA to store this value and add 2 hours to it so that the new time can be stored in a variable, and used in an email. But the value that I am receiving is 38013.6093769676! this is before I add 2 hours to it.

Is there a way or what do I have to do to add 2 hours to the current time. There is no reason why this should be collected from the workbook. I am happy for VBA to add two hours to current time!
Kindest Regards

Peter

### Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

#### SIXTH SENSE

##### Well-known Member
hi!
to add two hours, divide 2 by 24

take a look at this!
Book1
EFGH
1714:37:4016:37:40
Sheet3

#### clares

##### Well-known Member
Thanks for that. Thats great. But I need also to start with the correct time. 38013.6093769676 doesn't represent 14:37:40? any ideas or what function can I use to capture correct time value.

Kindest Regards

Peter

#### Seti

##### Well-known Member
The portion to the left of the decimal point is the date and to the right is the time. So 38013 is 1/27/04 (measured in elapsed days since 1/1/1900 or 1904 or sometime around there.

The .6093769676 is the portion of the day that has elapsed, 60% or so which is 2:37 PM or 14:37.

#### SIXTH SENSE

##### Well-known Member
clares said:
Thanks for that. Thats great. But I need also to start with the correct time. 38013.6093769676 doesn't represent 14:37:40? any ideas or what function can I use to capture correct time value.

Kindest Regards

Peter
hi!
i think that is the representation of january 27, 2004 2.37 pm

edit:
format the cell containing that value to mmmm dd, yyyy hh:mm:ss

#### clares

##### Well-known Member
OK guys. Thanks.

Time() returns the system time which will do

Kindest Regards

Peter

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,168,089
Messages
5,857,297
Members
431,869
Latest member
Avinashz

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back