Dateadd convert

Database
Enthusiast

Dateadd convert

Hi everyone, i'm searching for right conversion for this code:

 

DATEADD(DAY,24,DATEADD(M,DATEDIFF(M,0,GETDATE()),0))

 

anyone??

 

BR

2 REPLIES
Junior Contributor

Re: Dateadd convert

Simply run the code on you SQL Server box and check the result.

 

This simply returns the 1st of the current month and then add 24 days to get the 25th:

TRUNC(CURRENT_DATE, 'M') + 24
Enthusiast

Re: Dateadd convert

I got some other problems with code so i'll check later, tnx a lot!!!