Null Dates when exporting to MS SQL Server

Hey, I keep trying different date formats…but keep getting NULL values in date columns when I try to export to MS SQL Server… SQL server accepts yyyy-mm-dd when I do a manual insert:

insert into table_name(date field)

But with Easymorph, I just get NULLs


Hi Jarrell and welcome to the Community,

It seems that dates are stored as text values. Export to Database can only export dates when they are stored as numbers.

You can convert dates, stored as text, to numbers with “Text to Date” mode of Conver data types transformation.

Also, you can choose “When values don’t match column types: Fail batch” option in Export to Database action. This way you will get an error message when some values in an EasyMorph column don’t match the type of a target database column.

OK thanks

Hi Andrew

Thanks for this, I was having a similar problem when exporting to a Tableau extract.

Just out of interest, why does that error occur? I’m combining multiple spreadsheets into a single data source, adding in a date column using the ‘Calculate New Column(s)’ function.

E.g. #2008-03-31

From what I can see, this creates a new date in a number format. How come I then have to tell EasyMorph that it’s a date?

@alexlea88, are you sure that function in your Calculate New Column(s) transformation creates numeric value? You can check the type of a value in a cell with a Metadata popup from cell’s right-click menu. It should be Number, not Text.

Because there is no a special data type for dates in EasyMorph. Like in Excel, dates are just numbers. However, databases and Tableau distinguish dates as a separate data type. Therefore, when exporting into Tableau or database, one has to indicate whether a number in EasyMorph is also a number (in the target system/file type system), or it’s a date.

That’s great, many thanks for the clarification.