I am calling a stored procedure where I'm trying to cast a number into a datetime (as I'm grabbing it from excel so it converts dates to numbers:
exec UpdateInvoices @InvoiceDate = select cast(cast(42109 as datetime) as date)
This doesn't work, I get incorrect syntax near Select.
What's the correct way of doing this?