Welcome to WebmasterWorld Guest from 54.161.25.142

Forum Moderators: coopster & jatar k & phranque

Message Too Old, No Replies

view date format

how to diplay set text

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

5+ Year Member



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

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

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



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
2:33 pm on Nov 12, 2008 (gmt 0)



use POSIX;
print strftime('%d-%m-%Y %H:%M',localtime(TIMEVALUE()));
6:22 pm on Nov 16, 2008 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



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?).

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

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



What date is 02-11-2008 representing?

the OP refers to an october 24th date as an example, which removes the ambiguity.
3:19 pm on Nov 17, 2008 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Not for the reader it doesn't.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month