Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 50165

Delete the date and keep the time VBA

$
0
0
Hi All,

I have just hit a bit of a wall. All searches have turned a blank.

I need to delete the Date part of a time and date serial, it Must be done via VBA as its a scrpit that runs at night.

I have split the date into one column using the following little bit of code,

Code:

        For Each rCell In rDynamic
            rCell = Int(rCell)
        Next rCell

        rDynamic.NumberFormat = "dd/mm/yyyy"

works a treat, I need another column to have the time part of the date left in the cell.

And in case you wondered its feeding into a BI platform hence the reasons for it being VB and automatic.

Many thanks in advance.

Viewing all articles
Browse latest Browse all 50165

Trending Articles