ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   I have date I want time (https://www.excelbanter.com/excel-programming/301655-i-have-date-i-want-time.html)

RPIJG[_51_]

I have date I want time
 
I have this


Code
-------------------

Dim strtime As String
strtime = Format(Now, "yy-mm-dd "
-------------------


but that gives me the date and not the time, what do I need to do t
make this give me the current time

--
Message posted from http://www.ExcelForum.com


[email protected]

I have date I want time
 
Format(Time, "hh:mm:ss")

HTH
Paul
----------------------

Dim strtime As String
strtime = Format(Now, "yy-mm-dd ")

but that gives me the date and not the time, what do I need to do to
make this give me the current time?



Ron Rosenfeld

I have date I want time
 
On Wed, 16 Jun 2004 14:27:26 -0500, RPIJG
wrote:

I have this


Code:
--------------------

Dim strtime As String
strtime = Format(Now, "yy-mm-dd ")
--------------------


but that gives me the date and not the time, what do I need to do to
make this give me the current time?



strtime = Format(Now, "hh:mm")

--ron


All times are GMT +1. The time now is 02:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com