::: Uma's Blog :::
Friday, January 6, 2017
How to generate Smart date key from Year, Month and Date
SELECT
CONVERT
(
INT
,
CONVERT
(
VARCHAR
(
8
),
DATEFROMPARTS
(
[year]
,
[month]
,
[date]
),
112
))
FROM
dbo
.
FactSales
;
DATEFROMPARTS (year, month, day)
112 Format = yyyymmdd
ISO
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment