0

I'm trying to construct an SSIS package where one of the columns is a DT_DBDataTimeStamp format.

My problems is that I have to convert this to a DD/MM/YYYY format and I can't use a C# script.

I'm trying to use a derived column by having difficulty in getting the correct format.

I've tried Convert(varchar, Date_Column, 103) - doesn't work. I've tried DAY(Date_Column) + MONTH(Date_Column) + YEAR(Date_Column) - doesn't work.

Anybody know how I can do this?

Graham Reavey
  • 25
  • 1
  • 6

1 Answers1

0

It would need to be varchar if you want this (actually, I will use nvarchar for simplicity):

right("0" + (DT_WSTR,2) day(Date_Column), 2) + "/" +
right("0" + (DT_WSTR,2) month(Date_Column) , 2) + "/" +
(DT_WSTR,4)year(Date_Column)
Pang
  • 9,564
  • 146
  • 81
  • 122
KeithL
  • 5,348
  • 3
  • 19
  • 25