date issues

  • SELECT

    *

    FROM Table1

    WHERE

    mydate =convert(varchar, getdate(), 111)

    I am running this query in SSIS.I have data with todays date but I cant return the data with the above sql.It runs good in sql analyser but does not return data in SSIS.Appreciate reponses.

    sqlserver version 2000

    Thanks

  • Any errors?

    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    This thing is addressing problems that dont exist. Its solution-ism at its worst. We are dumbing down machines that are inherently superior. - Gilfoyle

  • no errors...the above sql does not return any data.

  • The dates in the database are stored as VARCHAR?

    In order to help you, I'd need to know the table structure and data of the table.

    --J

  • I have tried your code and tested using

    print CONVERT(nvarchar(30), GETDATE(), 111)

    print len(CONVERT(nvarchar(30), GETDATE(), 111))

    This returns :

    2010/06/11

    10

    Regards

  • Problem, we can't see what you see from where we sit. We don't know how your data is stored, nor do we know the structure of the table involved. We really could use more information to help you.

    Please read the first article I have referenced below in my signature block regarding asking for help.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply