-
Hello,
I have an excel spreadsheet with date and time in the same cell. My question is how do I separate thos data and put them into two different cells ?
The data looks like this:
1999-06-30 18:26:31
Then, I have to erase informations concerning seconds.
Any suggestion ?
-
Hello,
The function of date: is the date itself say 1999-06-30 and the time 18:26:31
I don't know about separating them but copy and pasting them
into an adjacent cell and then format one cell for time and one cell for date.... Just pick the correct category and type...
I don't know if it will help or not?!?!?
-
use NumberFormatLocal...
for example...
Code:
' A1 contains the date plus the time
' A2 will contain the date
' A3 will contain the time
Range("A2").Value = Range("A1").Value
Range("A2").NumberFormatLocal = "yyyy/mm/dd"
Range("A3").Value = Range("A1").Value
Range("A3").NumberFormatLocal = "hh:mm"
' This is applicable in VBA- Excel
-
Hi.
Try these short cuts. They make live much easier :cool:
To enter the current date into the active cell, press [Ctrl][;]
To enter the current time, press [Ctrl][Shift][;]
If you want to use them from VB, Use SendKey .
Good Luck.
Lyla
[Edited by Lyla on 03-21-2000 at 11:22 PM]
-
Ok, thank you all for the answers...
Nankien