home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / database / 6485 < prev    next >
Encoding:
Text File  |  1992-09-01  |  2.5 KB  |  59 lines

  1. Newsgroups: comp.databases
  2. Path: sparky!uunet!gfimda!joser
  3. From: joser@gfimda.uucp (Joe Rodriguez)
  4. Subject: Re: Ingres - inserting date & time values
  5. Message-ID: <Btx5z6.4o4@gfimda.uucp>
  6. Date: Tue, 1 Sep 1992 21:49:54 GMT
  7. References: <1992Aug28.203902.25709@desktalk.desktalk.com>
  8. Organization: Kraft General Foods
  9. Lines: 48
  10.  
  11. From article <1992Aug28.203902.25709@desktalk.desktalk.com>, by eric@desktalk.com (Eric Lieber):
  12. > I am posting this because I do not have Ingres yet and therefore I cannot try itout myself.
  13. > I want to insert a datetime value into a table. The format I have to use is:
  14. >     "yyyy-mm-dd hh24:mi:ss"
  15. > where hh24 is the 24 clock , (13:00 = 1:00 pm)
  16. > After reading the manual, I assume that the  II_DATE_FORMAT varable must
  17. >  be to set to  'SWEDEN/FINLAND'.
  18. >  The question is will Ingres  accept the following:
  19. >  insert into test_table (date_col)
  20. >            values (    "1992-12-31 13:45:59");
  21.  I am currently using INGRES 6.3 on an HP9000 system under HP-UX 8.0.  I 
  22.  have tried the following and it works:
  23.  
  24.      1.  Set II_DATE_FORMAT to SWEDEN
  25.      2.  created test_table with the date_col column of type date.
  26.      3.  entered the following SQL command:
  27.            insert into test_table (date_col)
  28.            values ('1992-12-31 13:45:59')
  29.  
  30.          which resulted in the row being inserted with the appropriate value.
  31.      I also tried the value of 'now' in place of the above time, and
  32.      the current system date and time was entered in the above date 
  33.      format.
  34.  
  35. Hope this is helpful.
  36.  
  37. +--------------------------+------------------------------------+
  38. | Joe Rodriguez            |    ||   //    /====\    +=======   |
  39. +--------------------------+    || //     ||         ||         |
  40. | Kraft General Foods      |    |</       ||  ====   ||====     |
  41. | General Foods-USA, IMD   |    || \\     ||    ||   ||         |
  42. | Mailcode:  T12-1         |    ||   \\    \====/    ||         |
  43. | 555 South Broadway       |------------------------------------+ 
  44. | Tarrytown, NY  10591     | joser@gfceb   - ICES INGRES Host   |
  45. | (914) 335-6059           | joser@gfimda  - IMD System         |
  46. |                          | INTERNET/UUCP:  gfimda!joser@uunet |
  47. | Pager: (212) 356-5116    |                 uunet!gfimda!joser |
  48. +--------------------------+------------------------------------+
  49. -- 
  50. +--------------------------+------------------------------------+
  51. | Joe Rodriguez            |    ||   //    /====\    +=======   |
  52. +--------------------------+    || //     ||         ||         |
  53. | Kraft General Foods      |    |</       ||  ====   ||====     |
  54.