IMPORTANT ANNOUNCEMENT

These forums were permanently set to read-only mode on July 20, 2022. From that day onwards, no new posting or comment is allowed on the site, but the historical content remains intact and searchable.

A new location for posting questions about PlanetPress Suite is now available:

OL Learn - PlanetPress Classic (opens in new tab)

Topic Options
#40930 - 10/03/12 02:59 PM format date
WNI Offline
OL Newbie

Registered: 09/09/11
Posts: 13
I have a date format coming in with yyyymmdd example 20090930 and need to have it displayed September 30,2009 I looked at the global date fuctions and found no workable solution


Edited by WNI (10/03/12 03:00 PM)

Top
#40931 - 10/03/12 04:55 PM Re: format date [Re: WNI]
Raphael Lalonde Lefebvre Offline
OL Expert

Registered: 10/14/05
Posts: 4956
Loc: Objectif Lune Montreal
WNI,

I would suggest that you take a look at our libraries of PressTalk functions:

http://www.objectiflune.com/OL/en-CA/Download/ResourceCenter/PlanetPressSuite/PressTalk.aspx#1

The "Date Functions" package should contain many useful functions, such as NormalizeDate, FormatDate, etc... to format date numbers. You can install those functions by going to Tools->Global Function Library Manager, point the folder where you've extracted the .pptl file, and then drag the functions to the right pane to include them in your document. I suggest that you import all of them in case of dependencies between functions.

Regards,
Raphaël Lalonde Lefebvre

Top
#40943 - 10/04/12 11:05 AM Re: format date [Re: Raphael Lalonde Lefebvre]
WNI Offline
OL Newbie

Registered: 09/09/11
Posts: 13
thanks for the quick response, I have imported the talk functions and created a PressTalk using the following code
@NormalizeDate((@(8,152,159)),'YYYYMMDD')
What am I missing to show the result in PressTalk editor?

Top
#40944 - 10/04/12 11:09 AM Re: format date [Re: WNI]
Raphael Lalonde Lefebvre Offline
OL Expert

Registered: 10/14/05
Posts: 4956
Loc: Objectif Lune Montreal
You are missing the show itself. smile

In a PressTalk object, you need the "show" command to display a string. Example:

show(@NormalizeDate((@(8,152,159)),'YYYYMMDD'))

This will display your date.

Regards,
Raphaël Lalonde Lefebvre

Top