Re: DateTime format of date



On 2009-03-19, Justin C <justin.0903@xxxxxxxxxxxxxx> wrote:
On 2009-03-18, Glenn Jackman <glennj@xxxxxx> wrote:
*SKIP*
my $formattedDate = strftime "%d%m%y", localtime;

Works perfectly, thank you. But I'm not sure what's going on.
strftime = STRing Formatting of TIME?
... and why is the documentation for it in DateTime when you don't need
the DateTime module for it to run? There's obviously still a *lot* for
me to learn.

(mere attempt to make you more confused) Consider reading something
about Unix programming. That will make rounds about C (the very old
stuff the Perl is still written in, you know) obviously, but when you'll
succeed you'll acquire better understanding what Perl does.

*SKIP*
substr( my $fmtDate = $date->dmy(), 4, 2) = '';

Yeah, but it's not as clear/elegant as your first suggestion.

I beg to differ. Either clearness or elegance is matter of taste. As
of me this one is cute and teaching.

--
Torvalds' goal for Linux is very simple: World Domination
Stallman's goal for GNU is even simpler: Freedom
.



Relevant Pages

  • Re: Converting to different date format.....
    ... DateTime dt=DateTime.Now; ... See the documentation for String formatting. ... to build custom formatting patterns: ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: compiling DateTime module on SCO OSR5
    ... >> I'm trying to compile DateTime module for Perl in SCO OSR5.07 and failing ... Perl 5.8 comes with the OS and is built and maintained be ... > Have you been able to install similar modules before? ...
    (perl.beginners)
  • WS Works Locally but not on Web Server
    ... I have a project that contains a WebService that works great when connecting ... Once we post the files to the test web server, ... BrickRed.RealEstateManagement.BackboneWS.RealEstatePointeBackbone.UTCToUserTime(Int32 iTimeZoneID, DateTime dtUTCTime) ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: DataFormatString not working on a GridView DateTime column
    ... Reason is that by default data is HTML-encoded before string formatting ... I have a BoundField in the GridView, ... DataField is set to the DateTime's Date property, and the DataFormatString ... The DateTime gets displayed with the time. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: DateTime format of date
    ... Do you /need/ to use DateTime for this? ... No, I don't need to use DateTime, and POSIX slipped in in error, I was ... Glenn's code uses the "strftime" subroutine provided by the POSIX module. ... The documentation for DateTime documents the strftime that it provides. ...
    (comp.lang.perl.misc)

Loading