Re: the 'date()' function

new topic     » goto parent     » topic index » view thread      » older message » newer message

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()'? smile

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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu