Results 1 to 2 of 2

Thread: Date1 = Date2 ?

  1. #1
    Join Date
    Feb 2002
    Posts
    2

    Unanswered: Date1 = Date2 ?

    How i do this :


    ... WHERE (id_pessoa = 1) AND (CONVERT(VARCHAR(12), Data) = CONVERT(CHAR(12), '04/02/2002'))

    in format (ddmmyyyy)

  2. #2
    Join Date
    Oct 2001
    Location
    England
    Posts
    426
    What is data? Is it a date?
    Why do you use varchar(12)

    then

    and data = convert(datetime,'04/02/2002',103)

    if it's the date in dd/mm/yyyy format then you don't need to convert - just use the left(data,10)

    What is in format ddmmyyyy?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •