Thread: format date
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Vergel Adriano Vergel Adriano is offline
external usenet poster
 
Posts: 857
Default format date

Assuming the data is in Column A, maybe try something like this:

In B1, enter this formula then fill down as necessary:

=DATEVALUE(LEFT(TRIM(A1), LEN(TRIM(A1))-12)) + TIMEVALUE(MID(TRIM(A1),
LEN(TRIM(A1))-12+1, 8))

In C1, enter this ofrmula then fill down as necessary:

=B1-B$1


Give column C a custom format like

s "seconds"




--
Hope that helps.

Vergel Adriano


"ABCD" wrote:

I have a column with data as shown below:

1 Jun 2007 06:00:50:000
1 Jun 2007 06:00:55:000
1 Jun 2007 06:01:00:000
1 Jun 2007 06:01:05:000
1 Jun 2007 06:01:10:000



I would like to format this data so that I can call the first data point (1
Jun 2007 06:00:50:000) as 0 seconds, and the following data points as 5
seconds, 10 seconds etc). The data is not all exactly separated by 5
seconds. I have some 45000 rows of data.