Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to clear timepart 1

Status
Not open for further replies.

graabein

Programmer
Oct 9, 2002
186
NO
Hi, I have a stored procedure that takes a datetime input parameter. Sometimes this variable has a date and a time but for the procedure to work as intended I have to have date 00:00:00.000 only.

What is the fastest way to clear the timepart right away? I'm thinking of doing this on the first line of the proc.

[elephant2]
graabein
 
CAST(CAST(inputparam AS DATE) AS TIMESTAMP)

HTH,
Jarl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top