Does anyone know how to strip the time from a datetime field declared in a stored procedure?
Printable View
Does anyone know how to strip the time from a datetime field declared in a stored procedure?
select DATEPART(hour,getdate())
select DATEPART(minute,getdate())
This is just an example...
assuming u're using SQL SERVER
Otherwise
use
select substring(convert(varchar(20),getdate()), 13, 20)
good luck