seperate data in a field into two fields

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

actually seperate two sets of hours that were inserted into one field. go
figure

ex: 1030 - 1145

What I really want to do is split into two fields then calculate the
difference in time
 
if the value is *always* the same format, as

Four numbers space dash space four numbers

then you can split the data with an Update query. add two new fields to your
table to hold the split values, then use the Left() and Right() functions to
get the values, as

Left(TableName.FieldName, 4)
Right(TableName.FieldName, 4)

hth
 
If they are consistently entered as shown then the following should return
the number of minutes.
DateDiff("n",(Format(Left("1030 - 1145",4),"@@:@@")),(Format(Right("1030 -
1145",4),"@@:@@")))

hopefully, the entry is using a 24 hour clock so you will get correct
calculations after noon and all times are entered as four digits "0730 -
0915" not "730 - 915"
 
Back
Top