Date function in Active X

Posted on 2004-11-03
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
    LVL 12

    Accepted Solution

    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

    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

    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

    "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...

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
    Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
    The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
    Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

    794 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

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now