Back to OIM Explorer

dbo.QBM_FCVDatetimeToDatetimeEve

Scalar FunctionSQL_SCALAR_FUNCTIONSandbox DB

Scalar Function.

Source: sandbox-db sys.sql_modules

Source size: 276 characters

Interpretation

  • Database function. Usually supports views, validation, or calculated predicates; look at referenced-by entries for callers.

Relations

  • No extracted relations.

Typed Edges

  • references source dbo.QBM_FCVDatetimeToString source text reference
  • references source dbo.QBM_FCVStringToDatetime source text reference

Complete Source

SQL12 lines
1CREATE FUNCTION dbo.QBM_FCVDatetimeToDatetimeEve(2  @in datetime3) RETURNS datetime4AS5BEGIN6  RETURN(CASE7  WHEN convert(datetime, CONVERT(date, @in)) <> @in THEN8  @in9  ELSE dbo.QBM_FCVStringToDatetime(10  LEFT(dbo.QBM_FCVDatetimeToString(@in), 10) + ' 23:59:59.990')11  END)12END
Open raw exported source
SQL ยท Raw3 lines
1    create   function dbo.QBM_FCVDatetimeToDatetimeEve(@in datetime) returns datetime as begin return (case when convert(datetime, CONVERT(date,2 @in)) <> @in then @in else dbo.QBM_FCVStringToDatetime(left(dbo.QBM_FCVDatetimeToString(@in), 10) + ' 23:59:59.990') end ) end 3