Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Splitting data in a cell
I have a spreadsheet that has a date and time in one
cell. I need to use this data to generate an SLA report showing the time difference between the two. How do I separate (strip) the two different data types so I can analyze it to create my SLA reports? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Splitting data in a cell
dim dtDate as Date
dtDate = Int(Range("A1").Value) msgbox format(dtDate, "mm/dd/yyyy") By taking the integer part of the number you strip off the time. in a worksheet formula =Trunc(A1) format the cell as date. Regards, Tom Ogilvy Verne wrote in message ... I have a spreadsheet that has a date and time in one cell. I need to use this data to generate an SLA report showing the time difference between the two. How do I separate (strip) the two different data types so I can analyze it to create my SLA reports? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Splitting data in a cell
Of couse the time would be
dim dtDate as Date dim dtTime as Date dtDate = Int(Range("A1").Value) dtTime = Range("A1").Value - dtDate msgbox format(dtDate, "mm/dd/yyyy") & " - " & _ format(dtTime,"hh:mm:ss") =A1-trunc(a1) and format as time. Regards, Tom Ogilvy Tom Ogilvy wrote in message ... dim dtDate as Date dtDate = Int(Range("A1").Value) msgbox format(dtDate, "mm/dd/yyyy") By taking the integer part of the number you strip off the time. in a worksheet formula =Trunc(A1) format the cell as date. Regards, Tom Ogilvy Verne wrote in message ... I have a spreadsheet that has a date and time in one cell. I need to use this data to generate an SLA report showing the time difference between the two. How do I separate (strip) the two different data types so I can analyze it to create my SLA reports? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Splitting data in a cell | Excel Discussion (Misc queries) | |||
Splitting Data in Cell | Excel Worksheet Functions | |||
Splitting data in a cell | Excel Discussion (Misc queries) | |||
Splitting Cell Data | Excel Discussion (Misc queries) | |||
Splitting Data in a Cell | Excel Worksheet Functions |