Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2010
    Posts
    5

    Unanswered: Can anybody help me with Date-Format Please

    Hello,
    I have a problem to define that date in my query.
    I want to check TABLE A there the date should be in date-format ddmmyyyy and it should check that the date is not in future. it should check the date with current or system date.

    I use this quesry but it gives me just the date format;

    SELECT *
    FROM public."TABLE_A" AS t

    Where
    (
    to_date(t."DATE", 'ddmmyyyy') < to_date('01011980','ddmmyyyy')
    )
    ;

    Please help me with this

  2. #2
    Join Date
    Aug 2009
    Location
    Olympia, WA
    Posts
    337
    You should store a date as a date not as a string.

    Code:
    SELECT * FROM table_a t
    WHERE to_date(t.date, 'DDMMYYYY') < current_date

  3. #3
    Join Date
    Aug 2010
    Posts
    5

    Thumbs up

    Thank you for your help It did work now

Posting Permissions

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