Loading ...
Sorry, an error occurred while loading the content.

1380Re: Newbie alert, why this does not work

Expand Messages
  • Fagyal, Csongor
    Oct 1, 2003
    • 0 Attachment
      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@...
      For additional commands, e-mail: asp-help@...
    • Show all 13 messages in this topic