perl-asp mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fagyal, Csongor" <conc...@conceptonline.hu>
Subject Re: Newbie alert, why this does not work
Date Wed, 01 Oct 2003 17:16:44 GMT
brentatkerson wrote:

>Okay, I seem to have missed the boat, I still cannot figure this 
>out, think I still have syntax wrong.  I have been to the link you 
>provided and still cannot get rid of that long number.  Could you 
>provide another hint to at least get me over the edge?
>  
>
Ok, try this:

<%
        $Response->Write(''.localtime(time));
%>

or simply

<%= ''.localtime(time) %>

[ Those are two '-s, not one " :-) This is (one way) for getting scalar 
context: localtime returns an array in list context, that's why you got 
those numers. ]


But this one might look more logical to you:
<%
        my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = 
localtime(time);
        $year += 1900;
        $mon++;
%>
<%= "$year-$mon-$mday $hour:$min:$sec" %>

Regards,
- Cs.


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Mime
View raw message