Here is a different way of doing the same thing that Bryon is showing. My version goes directly to a numeric time value, rather than creating a character value that is then input.
Names Default To Here( 1 );
// Create a sample data table with some Military times.....
// The column can be either numeric or character...the conversion
// formula handles both
dt = New Table( "Untitled 3", Add Rows( 2 ), New Column( "Military", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [1421, 923] ) ) );
// The wait() functions are just there to add a dramatic affect :-)
Wait( 2 );
// Add a new column to hold the converted times
// Use a time format since the conversion will create
// a value which is the number of seconds since midnight
dt << New Column( "time", Numeric, "Continuous", Format( "hr:m", 12 ) );
Wait( 2 );
// Run across all rows and do the conversion
// The formula will work as a column formula by just removing
// the ":time="
For Each Row(
:time = Num( Substr( Char( :Military ), -2 ) ) * 60 +
Num( Substr( Char( :Military ), 1, (Length( Char( :Military ) ) - 2) ) ) * 3600
);
Jim