In article <1994Feb23.175028.17776@porthos.cc.bellcore.com> foxj@moscow.cc.bellcore.com (fox,james p) writes:
>We are using rdefmtdate() and rfmtdate() from a C program to
>convert dates from character to long integer and back. The
>following sample code prints rc=-1228 for each call. The
>error message is "Message number not found in message file."
>and description relates to 4GL which we are not using.
>
>Any suggestions,
>Thanks,
>jim
>foxj@cc.bellcore.com
>
>
>/*******************************************************/
>main()
>{
> char cdate[11];
> long idate;
> int rc;
> rc = rdefmtdate(&idate, "mmm.dd.yyyy", "01/01/1994");
> printf("date 01/01/1994 rc=%d, \\n",rc);
> rc = rfmtdate(100,"mm/dd/yyyy",cdate);
> printf("date <%s> rc=%d, \\n",cdate, rc);
> }
>
rc = rdefmtdate(&idate, "mmm.dd.yyyy", "01/01/1994");
^^^^^^^^^^^^^
NOT A VALID FORMAT STRING!
Try "mmm. dd. yyyy" instead and see if that works.
rc = rfmtdate(100,"mm/dd/yyyy",cdate);
^^^^^^^^^^
NOT A VALID FORMAT STRING!
Try "mm/dd/yy" instead and see if that works.
Bob
--
-------------------------------------------------------------------
* Bob Beaulieu (bobb@netcom.com) eztravel@netcom.com *
* Tel: 408-978-0808 Fax: 408-978-7024 *
* Corporate Travel Services *
-------------------------------------------------------------------