FAQ
Hi folks !

What is the proper type for date or timestamp so that the field can also be
null or empty when inserting new rows?

I have to have fields for applied, accepted and renewed for a product license
and not all are necessarily present when creating a new product. Now I get
'bad timestamp external representation' for an empty form field.

BR,

--
Aarni Ruuhimäki
Megative Tmi
KYMI.com

Pääsintie 26
45100 Kouvola

info@kymi.com / aarni.ruuhimaki@kymi.com

05 - 3755 035 / 050 - 4910 037

*****************************************
Linux RedHat 7.3 / KDE 3.x Desktop
*****************************************

Search Discussions

  • Bruno Wolff III at Mar 4, 2003 at 2:07 pm

    On Tue, Mar 04, 2003 at 15:48:51 +0200, Aarni Ruuhimäki wrote:
    Hi folks !

    What is the proper type for date or timestamp so that the field can also be
    null or empty when inserting new rows?

    I have to have fields for applied, accepted and renewed for a product license
    and not all are necessarily present when creating a new product. Now I get
    'bad timestamp external representation' for an empty form field.
    '' is not the same as NULL .

    Your app probably needs to look for empty date and/or timestamp strings
    and replace them with NULL .
  • Aarni Ruuhimäki at Mar 4, 2003 at 2:40 pm
    Hi !

    And thanks.

    INSERT INTO .... VALUES(<cfif Trim(applied) is "">NULL<cfelse>'#applied#',
    ...)

    BR,

    aarni
    On Tuesday 04 March 2003 16:18, you wrote:
    On Tue, Mar 04, 2003 at 15:48:51 +0200,

    Aarni Ruuhimäki wrote:
    Hi folks !

    What is the proper type for date or timestamp so that the field can also
    be null or empty when inserting new rows?

    I have to have fields for applied, accepted and renewed for a product
    license and not all are necessarily present when creating a new product.
    Now I get 'bad timestamp external representation' for an empty form
    field.
    '' is not the same as NULL .

    Your app probably needs to look for empty date and/or timestamp strings
    and replace them with NULL .

    ---------------------------(end of broadcast)---------------------------
    TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
    --
    Aarni Ruuhimäki
    Megative Tmi
    KYMI.com

    Pääsintie 26
    45100 Kouvola

    info@kymi.com / aarni.ruuhimaki@kymi.com

    05 - 3755 035 / 050 - 4910 037

    *****************************************
    Linux RedHat 7.3 / KDE 3.x Desktop
    *****************************************

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-novice @
categoriespostgresql
postedMar 4, '03 at 1:59p
activeMar 4, '03 at 2:40p
posts3
users2
websitepostgresql.org
irc#postgresql

People

Translate

site design / logo © 2022 Grokbase