Hi,
I am not sure what exactly you mean by saying "to put the date into a '2014/05/03'"...
In
SQL Server, date values are stored in an
internal format,
not something like "DD/MM/YY", "YYYY/MM/DD", etc. But there are rules for how different
datetime formats are interpreted. If you'd like to know more about it, then read this article:
The ultimate guide to the datetime datatypes[
^]
Here's how to get the date in "YYYY/MM/DD" format:
1. SQL Server:
SELECT CONVERT(VARCHAR(10), GETDATE(), 111);
Result:
2014/05/03
2. SSIS:
(DT_STR, 4, 1252) DATEPART("yy", GETDATE()) + "/" + RIGHT("0" + (DT_STR, 2, 1252) DATEPART("mm", GETDATE()), 2) + "/" + RIGHT("0" + (DT_STR, 2, 1252) DATEPART("dd", GETDATE()), 2)
Result:
2014/05/03
I tested it with this tool:
SSIS Expression Editor & Tester[
^]
Please let me know if you need something else.