DateADD function in proc SQL not supported

Reply
New Contributor
Posts: 2

DateADD function in proc SQL not supported

I am trying to use Dateadd function in PROC SQL function . Though it is not supported in SAS.

DATEADD( "h",-1 (min(CPTR_TM)))

I want to fetch the dates which has 1 hour differenc. Please suggest some solution.

Thanks,

Asmita

PROC Star
Posts: 7,487

DateADD function in proc SQL not supported

Super User
Super User
Posts: 7,074

DateADD function in proc SQL not supported

I assume you mean a datetime value instead of a date value as dates do not have hours.

SAS stores datetime values in seconds so you could just add 3600 (60 minutes * 60 seconds) to the datetime value.

Ask a Question
Discussion stats
  • 2 replies
  • 4521 views
  • 0 likes
  • 3 in conversation