x

SSIS flat file null dates

Hello! I am importing a flat file and if the date is null ,needs to be converted to a value 9999-99-99 The raw date is in the format 01-01-2016 and I used the expression ISNULL([SDATE]) ? (DT_DBTIME)[SDATE] : (DT_DBTIME)(DT_STR,25,1252)"9999-99-99" Retain null values is checked and in the advanced properties the output date is database timestamp

Appreciate any suggestions. Thank you

more ▼

asked Apr 16 at 09:13 PM in Default

avatar image

apple
770 38 57 65

(comments are locked)
10|1200 characters needed characters left

2 answers: sort voted first

Why would you set a date to 9999-99-99? Surely, this is creating an error!

It's not a real date, the max date for DateTime and DateTime2 is 31/12/9999

more ▼

answered Apr 17 at 09:06 AM

avatar image

WRBI
61 1 3

(comments are locked)
10|1200 characters needed characters left

Even when I changed the date it is not displaying the right value -- the result is null

more ▼

answered Apr 17 at 12:51 PM

avatar image

apple
770 38 57 65

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x1245

asked: Apr 16 at 09:13 PM

Seen: 17 times

Last Updated: Apr 17 at 12:51 PM

Copyright 2018 Redgate Software. Privacy Policy