Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)

  • RE: Scalar Function - Format Numbers

    I'm trying to validate the phone numbers.

    In South Africa we have 10digits numbers. My table has different kind of numbers, Landline, Mobile numbers starting 0(then 9 digits) other starting with...

  • RE: Scalar Function - Format Numbers

    But 0842507889 = 10 digits.. 0 8 4, 2 5 0, 7 8 8 9 those are ten digits

  • RE: Calculating Duration

    I was trying

    WITH cte AS (

    SELECT

    TaskId

    ,CONVERT(DATE ,c.CreatedDate)AS DateSubmitted

    ,CONVERT(TIME ,c.CreatedDate)AS TimeSubmitted

    ,CONVERT(DATE ,c.TakenDate)AS DateTaken

    ,CONVERT(TIME ,c.TakenDate)AS TimeTaken

    ,CONVERT(DATE ,c.CompletedDate)AS DateCompleted

    ,CONVERT(TIME ,c.CompletedDate)AS TimeCompleted

    FROM [dbo].[CONSULTATION] c

    )

    SELECT

    TaskId

    ,DateSubmitted

    ,TimeSubmitted

    ,DateTaken

    ,TimeTaken

    ,DateCompleted

    ,TimeCompleted

    ,(TimeCompleted - TimeTaken) AS Duration

    FROM cte

    But...

Viewing 3 posts - 1 through 3 (of 3 total)