Shortened Time Format on Month View

Support for our integrated Contact Manager, Calendar, and Project Tracker.
Posts: 10
Joined: Thu Oct 31, 2013 7:55 am
PostPosted: Mon Nov 18, 2013 2:52 pm
Hi guys,

On our previous calendar, we were able to view the start and end time of events using an abbreviated format -- which allowed us to see many events' start and end time. The time formats would look like this:

Monday Dec 4
10a-2p Event1
11a-2:15p Event2
2p-5p Event3

We'd used a custom function for the time display that went something like this:

If ( Hour ( text ) > 12 ; Hour ( text ) - 12 ; Hour ( text ) )
& If ( Minute ( text ) > 0 ; ":" & Minute ( text ) )
& If ( Right ( GetAsTime ( text ) ; 2 ) = "PM" ; "p" ; "a" )


Is there a way to set up the Month view to display times like this using your calendar?
SeedCode Staff
SeedCode Staff
Posts: 475
Joined: Wed Jan 02, 2013 11:47 am
PostPosted: Tue Nov 19, 2013 9:22 am
You can edit the formatting of the time in the "Format Event Time --- Edit Time Formats for Events Here ---" script. Just change how the $sc_time variable is constructed in the Set Variable [$$sc_FormattedEvent; ...] step. HTH... Jeff
Posts: 10
Joined: Thu Oct 31, 2013 7:55 am
PostPosted: Tue Nov 19, 2013 12:38 pm
Thank you, Jeff!

In the script Format Event Time --- Edit Time Formats for Events Here ---, in the step Set Variable [$$sc_FormattedEvent; ...] step, I edited part of the script like this.


...
// -------------- ALL OTHERS -------------------

//Let ( [
//t1me = GetAsTime ( $$sc_DateTimeStart )
//];

Let ( [
t1me = If ( $$sc_Mode = "Month" ; GetAsTimeShorter ( GetAsTime ( $$sc_DateTimeStart ) ) ; GetAsTime (
$$sc_DateTimeStart ) )
];
...


Please note that the result of our custom function GetAsTimeShorter ( GetAsTime ( $$sc_DateTimeStart ) ) when tested is "10a" in an instance we are testing.

From the modification above, I expected it to display on month view as "10a Event1" but instead it displays as "?:0? pmEvent1".

What could I do to get it to display the result of our Custom Function "GetAsTimeShorter"?
SeedCode Staff
SeedCode Staff
Posts: 475
Joined: Wed Jan 02, 2013 11:47 am
PostPosted: Tue Nov 19, 2013 5:23 pm
It's actually the $sc_time variable that you want to populate with the formatted time. Look in the "12 hour time" section a little farther down in that calc. Try replacing that series of If[] statements with your custom function. If you'd like to have us write the custom code for you we can do that, but we would have to charge for the development time. Let me know if that's something you'd be interested in.
Posts: 10
Joined: Thu Oct 31, 2013 7:55 am
PostPosted: Thu Nov 21, 2013 8:57 am
Jeff, Thank you. That worked like a charm. We love this calendar!
SeedCode Staff
SeedCode Staff
Posts: 475
Joined: Wed Jan 02, 2013 11:47 am
PostPosted: Thu Nov 21, 2013 10:06 am
Terrific! Thanks for that feedback. :)

Return to SeedCode Calendar

Who is online

Users browsing this forum: Google [Bot] and 2 guests

cron
(855) SEEDCODE
[email protected]
Follow us: