homepage Welcome to WebmasterWorld Guest from 174.129.130.202
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
Forum Library, Charter, Moderators: coopster & jatar k & phranque

Perl Server Side CGI Scripting Forum

    
view date format
how to diplay set text
solow




msg:3776597
 11:14 am on Oct 30, 2008 (gmt 0)

hello people,

I'm awefully new at perl.
*and dutch so...*

I have a xml file, I want to display the date, and this is what it returns *in perl*:
2008-10-24T15:37:44.129690Z

What I want it to return is: 24-10-2008 15:37

How do I do this?

I tried using date::Format, perhaps I did something wrong, but i can't get it to work properly...
thanks in advanced

wesley

 

phranque




msg:3776652
 1:00 pm on Oct 30, 2008 (gmt 0)

welcome to WebmasterWorld [webmasterworld.com], wesley!

please post your best effort at Date::Format and we can probably fix it.
you need to massage the time string to create an input for time2str.
your time2str conversion format should be:
%d-%m-%Y %H:%M

Nick1973




msg:3784822
 2:33 pm on Nov 12, 2008 (gmt 0)

use POSIX;
print strftime('%d-%m-%Y %H:%M',localtime(TIMEVALUE()));

g1smd




msg:3787351
 6:22 pm on Nov 16, 2008 (gmt 0)

What date is 02-11-2008 representing?

Is it Feb 11th or 2nd November?

That very much depends on the reader, which is why you ought to consider using the ISO 8601 format on your website as the default format. In the Netherlands see NEN ISO 8601 (1994) and NEN EN 28601 (1994) and later revisions (2000, and 2004?).

phranque




msg:3787649
 2:59 am on Nov 17, 2008 (gmt 0)

What date is 02-11-2008 representing?

the OP refers to an october 24th date as an example, which removes the ambiguity.

g1smd




msg:3787934
 3:19 pm on Nov 17, 2008 (gmt 0)

Not for the reader it doesn't.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved