montymoose
Posts: 85
|
| Posted: 08/13/2007, 3:50 AM |
|
I need to display a date in the following format:
Sat Mar 10 15:16:08 MST 2001
For some reason CCS will not use the 'D' function shown on PHP websites to display the 3 letter day and month. Any ideas how to get round this?
John
|
 |
 |
Wkempees
|
| Posted: 08/13/2007, 5:15 AM |
|
MontyMouse,
It is important for us to understand when and where you are trying to do
this.
Fact:
MultiLanguage CCS does cater for (translated=localized) day and month
names in Long and Short forms. This you can check by gloably reading the
Common.php.
Fact:
In Design, you have the ability to set a labels date format through a
dropdownlist in it's properties. The List is a helpful way to choose
much used formats, but doesn't stop you from changing the selected
choice. Through some experimenting I found for you that the way the
format is displayed there does not in fact follow the PhP standards.
Which is explained by CCS being MultiPlatform.
Studying the Common.php, I found that
'dddd' is the long day name
'ddd' is the abbreviated day name
'dd' is the one letter day
'd' is the numeric date
'mmmm'is the long month name
'mmm' is the abbreviated month name
'mm' is the one letter monthname
'm' is the numeric month
So, in Design->Label->Properties->Format ddd, mmm d, yyyy
should result in Sat, Mar 10
In fact the Format is array("ddd", ", ", "mmm", " ", "d", ", ", "yyyy")
if you need it in programming.
Well, that comprizes my long answer for today.
Hope it's helpful.
Walter
|
|
|
 |
DonB
|
| Posted: 08/13/2007, 5:25 AM |
|
CCS supports multiple platforms, not just PHP. Thus, there is a set of
date/time formats implemented consistently across all platforms. These
differ from the PHP format designators. It's all documented in the help
file.
--
DonB
http://www.gotodon.com/ccbth
"montymoose" <montymoose@forum.codecharge> wrote in message
news:546c03763b5882@news.codecharge.com...
> I need to display a date in the following format:
>
> Sat Mar 10 15:16:08 MST 2001
>
> For some reason CCS will not use the 'D' function shown on PHP websites to
> display the 3 letter day and month. Any ideas how to get round this?
>
> John
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
montymoose
Posts: 85
|
| Posted: 08/13/2007, 9:42 AM |
|
Thanks for your in depth replies. I've sorted it. Onwards and upwards!
M00S3
|
 |
 |
montymoose
Posts: 85
|
| Posted: 08/14/2007, 4:25 AM |
|
I've found the table in the help file now which compares all the code languages and date formats. What do I do If I want to use a format which doesn't have a CCS related item - ie
1st 2nd 3rd - English ordinal dates. This would be useful, and PHP allows you to do it with the 'S' date tag.
Any thoughts?
|
 |
 |
|