Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Date function in Active X

Posted on 2004-11-03
Medium Priority
Last Modified: 2013-11-25
Would like to use the Date function for setting the current date in DTS transformation.
This is what I have in my ActiveX transform

DTSDestination("ld_dte")=<%=Date %>

This is giving me an error

ld_dte is of type datetime.
Question by:aswam1975
  • 2
  • 2
LVL 12

Accepted Solution

pique_tech earned 120 total points
ID: 12486371
I think the scripting languate here is VBScript.  Try this:
   DTSDestination("ld_dte")= Date() 'for the date only
   DTSDestination("ld_dte")= Now() 'for the date and time
LVL 34

Expert Comment

ID: 12488989
If the destination is a database and this is the default value, I would set the default value to GETDATE() at the database level--will be much faster than ActiveX script....
LVL 12

Expert Comment

ID: 12489051
Good point, if it's the only translation being performed, or if all the translations can be done in SQL.  Due to that performance difference, I try very hard to do all my translations in SQL.

Stylistically, if I were performing any translations that required ActiveX, I'd probably do them all in the same place (a script) rather than doing some in script and some in SQL, unless the performance were wildly different.  I'd find that easier to maintain and debug.
LVL 34

Expert Comment

ID: 12489208
"if it's the only translation being performed, or if all the translations can be done in SQL"

Or the only translation outside of simple Column Copy transforms...

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Suggested Courses

572 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question