1. the 'date()' function
- Posted by eel picton <eelpics at yahoo.co.uk> Jun 25, 2004
- 426 views
hello... can anyone help please??? i've tried using the 'date()' function in a euphoria program as shown in the 'library' text. e.g. now = date() (where 'now' has already been declared as a sequence) however this generates the error "'date' has not been declared" the 'library' description of 'date()' does not state that one of the 'include' files must be 'included' e.g. 'misc.e' or 'get.e' so i am not sure what i've missed... thank you for any ideas or advice you may be able to offer... cheerz... eel...
2. Re: the 'date()' function
- Posted by irv mullins <irvm at ellijay.com> Jun 25, 2004
- 412 views
eel picton wrote: > > hello... can anyone help please??? > > i've tried using the 'date()' function in a euphoria program as shown in the > 'library' > text. > > e.g. now = date() > > (where 'now' has already been declared as a sequence) That appears to be correct. > however this generates the error "'date' has not been declared" Look to see if there is an ex.err file, and if so, post it, that might help. > the 'library' description of 'date()' does not state that one of the 'include' > files > must be 'included' e.g. 'misc.e' or 'get.e' The date() function in built in, you shouldn't need any includes to have it work. Irv
3. Re: the 'date()' function
- Posted by Juergen Luethje <j.lue at gmx.de> Jun 25, 2004
- 412 views
eel picton wrote: > hello... can anyone help please??? > > i've tried using the 'date()' function in a euphoria program as shown > in the 'library' text. > > e.g. now = date() > > (where 'now' has already been declared as a sequence) > > however this generates the error "'date' has not been declared" > > the 'library' description of 'date()' does not state that one of the > 'include' files must be 'included' e.g. 'misc.e' or 'get.e' > > so i am not sure what i've missed... > > thank you for any ideas or advice you may be able to offer... In cases like this, it's always a good idea to post the *actual code* that you use here, rather then trying to describe the code in prose. I just tested the following:
sequence now now = date()
It runs fine of course, using the DOS and the Windows Euphoria 2.4 interpreter. Maybe you wrote 'now = date' instead of 'now = date()'? Regards, Juergen
4. Re: the 'date()' function
- Posted by "Kat" <gertie at visionsix.com> Jun 25, 2004
- 465 views
On 25 Jun 2004, at 14:14, Juergen Luethje wrote: > > > posted by: Juergen Luethje <j.lue at gmx.de> > > eel picton wrote: > > > hello... can anyone help please??? > > > > i've tried using the 'date()' function in a euphoria program as shown > > in the 'library' text. > > > > e.g. now = date() > > > > (where 'now' has already been declared as a sequence) > > > > however this generates the error "'date' has not been declared" > > > > the 'library' description of 'date()' does not state that one of the > > 'include' files must be 'included' e.g. 'misc.e' or 'get.e' > > > > so i am not sure what i've missed... > > > > thank you for any ideas or advice you may be able to offer... > > In cases like this, it's always a good idea to post the *actual code* > that you use here, rather then trying to describe the code in prose. > > I just tested the following: > }}} <eucode> > sequence now > now = date() > </eucode> {{{ > > It runs fine of course, using the DOS and the Windows Euphoria 2.4 > interpreter. Maybe you wrote 'now = date' instead of 'now = date()'? Or maybe wrote Date() in the actual code, which is a different animal entirely! This works too (watch it wordwrap and be unuseable) object junk junk = date() -- for 4,5,6 if (junk[4] > 12) then junk[4] -= 12 end if junk = sprintf("%d",junk[4]) &":"& sprintf("%d",junk[5]) &":"& sprintf("%d",junk[6]) titlebar(junk&" this has been a date test... go on now!") Kat