Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Splitting data in a cell James Excel Discussion (Misc queries) 1 February 24th 10 06:34 PM
Splitting Data in Cell [email protected] Excel Worksheet Functions 5 June 17th 09 01:09 PM
Splitting data in a cell JamesBurrows Excel Discussion (Misc queries) 9 June 13th 06 05:06 PM
Splitting Cell Data Zip Codes Excel Discussion (Misc queries) 5 June 2nd 05 04:52 AM
Splitting Data in a Cell Newbie1092 Excel Worksheet Functions 3 May 10th 05 05:48 PM


All times are GMT +1. The time now is 03:05 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"