X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id DACE5D1D592 for ; Fri, 21 Nov 2003 09:50:56 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 40110-02 for ; Fri, 21 Nov 2003 05:50:27 -0400 (AST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id 02B15D1D5B1 for ; Fri, 21 Nov 2003 05:50:25 -0400 (AST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.12.9/8.12.9) with ESMTP id hAL9oONu078335 for ; Fri, 21 Nov 2003 09:50:24 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id hAL9dKuh076388 for pgsql-sql@postgresql.org; Fri, 21 Nov 2003 09:39:20 GMT From: "nobody" X-Newsgroups: comp.databases.postgresql.sql Subject: How to quote date value? Date: Fri, 21 Nov 2003 09:39:18 -0000 Organization: Hub.Org Networking Services Lines: 27 Message-ID: X-Complaints-To: usenet@news.hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 To: pgsql-sql@postgresql.org X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/320 X-Sequence-Number: 16135 What is correct character to quote date values in SELECT. Is is single quote? When I do: SELECT '1/11/2003' AS "InvoiceDate"; the returned value is of unknown type (not a date). Then I tried: SELECT 1/11/2003 AS "InvoiceDate"; and the InvoiceDate was set to zero (I guess the engine divided the numbers in date). Then I tried: SELECT 1-11-2003 AS "InvoiceDate"; and the numbers in date value got substracted. Using PostgreSQL 7.4 and PgAdmin 3. Any insight is welcome.