简体   繁体   中英

splitting date into year month day SQL server

Is there a way to split dates into int value year, month, and day and then insert them into SQL server DB using SSIS?

You can use derived column transformation with the built-in date and time functions as follows:

DAY([date_column])
MONTH([date_column])
YEAR([date_column])

Also, you can use the DATEPART() function as follows:

DATEPART( "day", [date_column] )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM