Note: Forums will be making significant UX changes to address key usability improvements surrounding search, discoverability and navigation. To learn more about these changes please visit the announcement which can be found HERE.
need to delete data based on current date that is in variable

Answered need to delete data based on current date that is in variable

  • Friday, February 15, 2013 8:36 AM
     
     

    hi

    I have one table vicidial_list i need to do delete from it based on getdate -1 used via variable.

    but the problem is both the date format is different.

    Like

    select top 1 modify_date from vicidial_list       01-01-2013 02:01:59
    select (GETDATE())                                      2013-02-15 13:37:31.250

    I need to use

    delete from vicidial_list

    where modify_date =?

    I'm getting error.

    [Execute SQL Task] Error: Executing the query "DELETE from vicidial_list where
    entry_date =?" failed with the following error: "Invalid time format". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

    Kindly help

All Replies