sql.DateTime fails on SQL 2005
See original GitHub issue days = Math.floor((parameter.value.getTime() - UTC_EPOCH_DATE.getTim
^
TypeError: undefined is not a function
In data-type.js you have missed to convert date string to object as you have done for DateTime2
if (parameter.value != null) {
parameter.value = new Date(+parameter.value); // this line is missing - line 261
if (options.useUTC) {
Issue Analytics
- State:
- Created 8 years ago
- Reactions:1
- Comments:7
Top Results From Across the Web
EF and datetime in SQL Server 2005 - Stack Overflow
I am testing an application on server with SQL Server 2005 and I am getting the following error (the application runs fine with...
Read more >Salesforce to SQL Server 2005 Datetime Error
I am trying to updte a SQL Server table when a new record is inserted into Salesforce. The flow works perfectly but the...
Read more >How to format datetime & date in Sql Server 2005
First we start with the conversion options available for sql datetime formats with century (YYYY or CCYY format). Subtracting 100 from the Style ......
Read more >SQL Server Error Messages - Msg 242
Causes: This error occurs when trying to convert a string date value into a DATETIME data type but the date value contains an...
Read more >Backup of misconfigured SQL Server DB fails due to unknown ...
Backup fails with the error below when using SQL Server 2008 or newer database configured as SQL Server 2005 database. The error is:...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Yes, @agarstang it works. What I meant is that you pass/use a VarChar in your query/proc instead of a DateTime, so it never needs to be converted. SQL does the conversion when it processes the query; and, as long as the varchar string holding the date is formatted in an acceptable way, the implicit conversion works fine. So, something like this works for me…
I’m using 4.1.0
As stated above, the fix is simple. Please change the if statement on line 300 to