What am I doing wrong here?
Declare @starttimestamp datetime = getdate();
RAISERROR(N'Code not valid until %s', 16, 1, CAST(@starttimestamp AS VARCHAR));
Produces an error saying Incorrect syntax near 'CAST'. and Incorrect syntax near '@starttimestamp'. Expecting SELECT or (
You can’t perform a function within the raiserror command. Convert your date to a string first, like this: