We're pleased to announce the acquisition of
eTicket!
Looking for a better way to talk to your customers? Try eTicket!
Home
Help
Search
Login
Register
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search
Advanced search
8043
Posts in
1856
Topics- by
2099
Members
- Latest Member:
roi
Calendar Script Community
Customization
Customizing CalendarScript
(Moderators:
scott
,
DanO
,
Marty
)Display time_added in Event View as MM/DD/YYY
« previous
next »
Pages: [
1
]
Go Down
Author
Topic: Display time_added in Event View as MM/DD/YYY (Read 485 times)
0 Members and 1 Guest are viewing this topic.
Jason S
New Member
Karma: 0
Offline
Posts: 3
Display time_added in Event View as MM/DD/YYY
«
on:
August 14, 2007, 03:25:48 PM »
I enabled the field to display in Event View but it shows as a Unix Timestamp. I want to display MM/DD/YYYY (time of day is not important). Does anyone have a sub written that will take a Unix time and return MM/DD/YYYY?
Thanks.
Logged
musicvid
New Member
Karma: 1
Offline
Posts: 8
Re: Display time_added in Event View as MM/DD/YYY
«
Reply #1 on:
August 14, 2007, 06:35:23 PM »
Well, you could accomplish this using the template variables found in the documentation, but this way is just as easy:
use POSIX qw(strftime);
my @time_added = gmtime($EVENT->{details}->{time_added});
my $date_added = strftime("%m/%d/%Y", @time_added);
«
Last Edit: August 14, 2007, 06:44:14 PM by musicvid
»
Logged
Pages: [
1
]
Go Up
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> FAQS
=> Advertise on CalendarScript
-----------------------------
Setup and Installation
-----------------------------
=> Installation and Setup
=> Problems and Solutions
-----------------------------
Customization
-----------------------------
=> Customizing CalendarScript
=> Hacks and Mods
=> Plugins
-----------------------------
Making CalendarScript Better
-----------------------------
=> Suggestions and Ideas
=> Showcase
-----------------------------
Licensing
-----------------------------
=> Licensing
-----------------------------
Everything Else
-----------------------------
=> General Use