Re: Informix 4gl pgm to reformat dates to Month dd, yyyy
Posted in 1998
In article <6al5f8$rq1@cssun.mathcs.emory.edu>, davin_harvey@dsti.co.uk
writes
>This is a multipart message in MIME format
>
>--------------InterScan_NT_MIME_Boundary
>Content-Type: text/plain; charset=ISO-8859-1
>Content-transfer-encoding: quoted-printable
>
> Can't you do this by setting the GL_DATETIME environment variable to=20
> "%B %e, %iY", or doesn't this work with 4GL=2E It doesn't work in=20
> dbaccess (but will soon), but works in ESQL/C=2E
> =20
> Davin
>
>
That is what I did...
>______________________________ Reply Separator ____________________________=
>_____
>Subject: Informix 4gl pgm to reformat dates to Month dd, yyyy
>Author: PC {kirbyramz@aol=2Ecom} at INTERNET
>Date: 27/01/98 16:41
>
>
>I was not able to find any formatting that would format dates to show the=20
>month
>spelled out so I wrote the following pgm=2E
>If there is any other programs that already do the same please reply=2E
> =20
>Kirby Ramsey, Visual Services Inc=2E, Bloomfield Hills, MI
> =20
> =20
> =20
> =20
>function date_rtn(in_date)=20
>define prt_date char(8),=20
> in_date date,=20
> prt_mth,prt_day char(2),=20
> prt_yr char(4),=20
> prt_month char(10),=20
> print_date,=20
> new_db,sw_type char(20)=20
> =20
>let prt_date =3D in_date using "mmddyyyy"=20
>let prt_mth =3D prt_date[1,2]=20
>let prt_day =3D prt_date[3,4]=20
>let prt_yr =3D prt_date[5,8]=20
> =20
>if prt_day[1,1] =3D "0" then=20
> let prt_day =3D " ", prt_day[2,2]=20
>end if=20
> =20
>call date_month(prt_mth) returning prt_month=20
> =20
>let print_date =3D prt_month clipped," ",prt_day,", ",prt_yr=20
> =20
> return(print_date)=20
> =20
>end function=20
> =20
>function date_month(prt_mth)=20
> =20
>define prt_mth char(2),=20
> prt_month char(10)=20
> =20
>if prt_mth =3D "01" then=20
> let prt_month =3D "January"=20
>end if=20
>if prt_mth =3D "02" then=20
> let prt_month =3D "February"=20
>end if=20
>if prt_mth =3D "03" then=20
> let prt_month =3D "March"=20
>end if=20
>if prt_mth =3D "04" then=20
> let prt_month =3D "April"=20
>end if=20
>if prt_mth =3D "05" then=20
> let prt_month =3D "May"=20
>end if=20
>if prt_mth =3D "06" then=20
> let prt_month =3D "June"=20
>end if=20
>if prt_mth =3D "07" then=20
> let prt_month =3D "July"=20
>end if=20
>if prt_mth =3D "08" then=20
> let prt_month =3D "August"=20
> end if=20
>if prt_mth =3D "09" then=20
> let prt_month =3D "September"=20
>end if=20
>if prt_mth =3D "10" then=20
> let prt_month =3D "October"=20
>end if=20
>if prt_mth =3D "11" then=20
> let prt_month =3D "November"=20
> end if=20
>if prt_mth =3D "12" then=20
> let prt_month =3D "December"=20
>end if=20
> =20
> return(prt_month)=20
> =20
>end function=20
> =20
>
>**********************************************************************
>DST International Tel:+44 181 390 5000 www=2Edstinternational=2Eco=2Eu=
>k=20
>
>This message and any attachments to it is intended only for the=20
>individual or company to which it is addressed and may contain=20
>information which is privileged, confidential or prohibited from=20
>disclosure or unauthorised use=2E If the recipient of this=20
>transmission is not the intended recipient, or the employee or agent=20
>responsible for delivering such materials to the intended recipient,=20
>you are hereby notified that any use, any form of reproduction,=20
>dissemination, copying, disclosure, modification, distribution and/or=20
>publication of this e-mail message or its attachments other than by=20
>its intended recipient is strictly prohibited by the sender=2E =20
>
>If you have received it in error, please notify us immediately by=20
>telephone on the number above and destroy the message and all copies=20
>in your possession=2E
>**********************************************************************
>
>
>--------------InterScan_NT_MIME_Boundary--
--
David Williams
Maintainer of the Informix FAQ
Primary site (Beta Version) http://www.smooth1.demon.co.uk
Official site http://www.iiug.org/techinfo/faq/faq_top.html
I see you standin', Standin' on your own, It's such a lonely place for you, For
you to be If you need a shoulder, Or if you need a friend, I'll be here
standing, Until the bitter end...
So don't chastise me Or think I, I mean you harm...
All I ever wanted Was for you To know that I care