SQL add data from multi seconds

0

How can I make convert and add the last day of the previous month and the first day of the previous month when I have the date ( created time ) in milliseconds? The code is below:

DATEADD(month, DATEDIFF(month, -1, getdate()) - 2, 0) as FirtDayPreviousMonthWithTimeStamp,

DATEADD(ss, -1, DATEADD(month, DATEDIFF(month, 0, getdate()), 0)) as LastDayPreviousMonthWithTimeStamp

I have this:

WHERE  (((wo.CREATEDTIME >= 1527807600000)

AND ((wo.CREATEDTIME != 0)

AND (wo.CREATEDTIME IS NOT NULL)))

AND ((wo.CREATEDTIME <= 1530399599000)

AND (((wo.CREATEDTIME != 0)

AND (wo.CREATEDTIME IS NOT NULL))

AND (wo.CREATEDTIME != -1)))) 

AND wo.ISPARENT='1' AND wo.IS_CATALOG_TEMPLATE='0'
    
asked by anonymous 10.07.2018 / 17:05

0 answers