Quant Lego
Building Blocks for Financial Quant Skills
Top Menu
(Move to ...)
Home
▼
Pages
(Move to ...)
Table of Contents
▼
Saturday, June 22, 2013
Truncate minute and second timestamp from date value in SQL
Suppose we retrieve a variable 'Valuation_Date' from SQL database and get following number
2012-01-22 00:00:00.000
We can use convert function to truncate minute and second timestamp using the
convert
function
convert(varchar(8), Valuation_Date, 112)
then we will get following reault:
20120122
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment