home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!howland.reston.ans.net!spool.mu.edu!uwm.edu!ogicse!flop.ENGR.ORST.EDU!gaia.ucs.orst.edu!umn.edu!moose.cccs.umn.edu!mcj
- From: mcj@moose.cccs.umn.edu (Mark C. Jones)
- Newsgroups: comp.databases.ingres
- Subject: Re: Q: How to get dates as DD/MM/YYYY?
- Message-ID: <12JAN199312410846@moose.cccs.umn.edu>
- Date: 12 Jan 93 18:41:00 GMT
- Article-I.D.: moose.12JAN199312410846
- References: <C0pLpE.DBx@demon.co.uk> <1993Jan12.143505.16942@tpghq.com>
- Sender: news@news2.cis.umn.edu (Usenet News Administration)
- Reply-To: mcj@moose.cccs.umn.edu
- Organization: Colon Cancer Control Study, University of Minnesota, Minneapolis
- Lines: 32
- News-Software: VAX/VMS VNEWS 1.41
- Nntp-Posting-Host: moose.cccs.umn.edu
-
- In article <C0pLpE.DBx@demon.co.uk> Tom Davies <tomd@horse.demon.co.uk> writes:
- >Is there any way of getting values from a date column in the format
- >'dd/mm/yyyy', i.e. *with* the century, without messing around with
- >date-part?
- >Thanks,
- > Tom
- >---------------------------------------------------------------------
- > Tom Davies - 14 Rotterdam Drive, London E14 3JA, 071 987 0392
- > - tomd@horse.demon.co.uk
- >
- > -----PGP 2.0 PUBLIC KEY AVAILABLE-----
- >---------------------------------------------------------------------
- >
-
-
- This is an ugly but effective method that always works!
-
- trim(left(shift(date_gmt( YOUR_DATE ),-5),2))
- +'/'+
- trim(left(shift(date_gmt( YOUR_DATE ),-8),2))
- +'/'+
- trim(left(date_gmt( YOUR_DATE ),4))
-
-
-
- ------------------------------------------------------------------
- Mark C. Jones (mcj@moose.cccs.umn.edu)
- CSC Partners
- 5500 Wayzata Blvd, Suite 1100
- Minneapolis MN 55416 USA
- +1 612 593 1122
- ------------------------------------------------------------------
-