[futurebasic] Re: [FB] How can I get the date in mm/dd/yyyy format

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : September 1999 : Group Archive : Group : All Groups

From: Joe Lewis Wilkins <PepeToo@...>
Date: Wed, 01 Sep 1999 15:57:41 -0700
Jayson Garrett wrote:

> The subject pretty much says it all. :-)
> Can someone show me an example of how to get the system date in mmddyyyy
> format? DATE$() only returns 2 digits for the year, and I need to retrofit a
> program I have for the new year.

Try the following (not everything is DIMmed: Joe Wilkins

LOCAL FN theLongDate$
  DIM LongDate$
  DIM osErr%
  DIM secs&
  osErr% = FN READDATETIME (secs&)
  CALL IUDATESTRING (secs&,_LongDate,LongDate$)
  CALL IUDATESTRING ([_Time],_LongDate,LongDate$)
END FN = LongDate$                                'FN theLongDate$

longDate$ = FN theLongDate$
yr$ = RIGHT$(longDate$,4)
dayMon$ = LEFT$(DATE$,6)
theDDMMYYY$ = dayMon$+yr$


DELAY 2000                                        'So you can set the results