• [font="Verdana"]Okay, it looks to me as though you are trying to do the following:

    1. display the start of the day on which the service order was created

    2. display the start of the month on which the service order was created

    Can I suggest you try the following code?

    declare @x table(

    CREATED_AT datetime not null default getdate()

    );

    insert into @x values(default);

    select

    1

    , dateadd(day, datediff(day, 0, CRM_Orders.CREATED_AT), 0) as [Service Order Created At]

    , dateadd(month, datediff(month, 0, CRM_Orders.CREATED_AT), 0) as [Service Order Created At Month]

    from @x CRM_Orders

    The way you were trying to do it was a bit overcomplicated, and also prone to errors because it relies on the default date format for the server. If the server changes default date format, your code would break.

    [/font]