Logo

SQL Server MISEC Function

Updated 2023-11-09 14:51:04.393000

Description

Use the scalar function MISEC to convert from feet per hour, feet per minute, feet per second, inches per second, kilometers per hour, knots, miles per hour, miles per minute, miles per second, meters per second, meters per minute or meters per hour to miles per second.

Syntax

SELECT [westclintech].[wct].[MISEC] (
  <@Speed, float,>
 ,<@From_scale, nvarchar(4000),>)

Arguments

@Speed

is any real number. @Speed is an expression of type float or of a type that can be implicitly converted to float.

@From_scale

is the description of the units for @Speed. @From_scale must be a valid value as specified in speed unit representations. @From_scale must be of a data type that is implicitly convertible to varchar.

Return Type

float

Remarks

The following table is a representation of the conversion of one of the speed units of measure into miles per second:

column 1column 2
feet per hour5.26094E-08
feet per minute3.15657E-06
feet per second0.000189394
inches per second1.57828E-05
kilometers per hour0.000172603
knots0.000319661
miles per hour0.000277778
miles per minute0.016666667
miles per second1
meters per second0.000621371
meters per minute1.03562E-05
meters per hour1.72603E-07

Conversion of meters includes all the standard prefixes with kilo representing 1,000 and yocto representing 10E-24.

Examples

select wct.MISEC(10, 'm/s');

Here is the result set.

column 1
0.00621371192