home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / database / ingres / 2227 < prev    next >
Encoding:
Text File  |  1993-01-12  |  1.6 KB  |  37 lines

  1. Newsgroups: comp.databases.ingres
  2. Path: sparky!uunet!tpghq!sfc
  3. From: sfc@tpghq.com (Steve Caswell)
  4. Subject: Re: Q: How to get dates as DD/MM/YYYY?
  5. Message-ID: <1993Jan12.143505.16942@tpghq.com>
  6. Organization: Palmer & Associates, Inc., Norcross, GA
  7. References: <C0pLpE.DBx@demon.co.uk>
  8. Date: Tue, 12 Jan 1993 14:35:05 GMT
  9. Lines: 26
  10.  
  11. In article <C0pLpE.DBx@demon.co.uk> Tom Davies <tomd@horse.demon.co.uk> writes:
  12. >Is there any way of getting values from a date column in the format 
  13. >'dd/mm/yyyy', i.e. *with* the century, without messing around with 
  14. >date-part?
  15. >Thanks,
  16. >    Tom
  17. >---------------------------------------------------------------------
  18. >        Tom Davies - 14 Rotterdam Drive, London E14 3JA, 071 987 0392
  19. >                   - tomd@horse.demon.co.uk
  20. >
  21. > -----PGP 2.0 PUBLIC KEY AVAILABLE-----
  22. >---------------------------------------------------------------------
  23.  
  24. The answer depends on what you mean by "get".  You can easily display dates in
  25. this format (really in just about any format).  On a VIFRED form, create a 
  26. field with datatype of date, and display format of "03/02/1901".  The VIFRED
  27. Reference Manual explains this format.  To get this into a program variable
  28. via a select, you will have to play with the date_part function.  You should
  29. be able to use date_part to get the various pieces of the date (hopefully
  30. the centry also, but I can't guarantee it) and then put them back together.
  31.  
  32. -- 
  33.  
  34. Steve Caswell           |   (404) 448-7727    |  "The opinions expressed are my
  35. Principal Consultant    |   sfc@tpghq.com     |   own.  They may not be perfect,
  36. The Palmer Group        |   uunet!tpghq!sfc   |   but they're all I've got."
  37.