dbTalk Databases Forums  

Month name problem

comp.databases.filemaker comp.databases.filemaker


Discuss Month name problem in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
JF
 
Posts: n/a

Default Month name problem - 03-31-2007 , 08:36 PM






Hi

Everytime I have a good idea, FM8.5 come right back at me and force me to
forget about it....

I have a calculation field that return "text" inside that I have text with
merge in a "date" like this
cPPM_Expiration is a custom fonction OR I Also try a Calculation Field
(date)

Case (
cPPM_Expiration ? Get ( CurrentDate );TextColor("Contact will expired on "
& Day (cPPM_Expiration) & " " & MonthName ( cPPM_Expiration ) & " " & Year
( cPPM_Expiration );RGB (115;150;115));

cPPM_Expiration < Get ( CurrentDate );TextColor ( "The contract is expired
since " & cPPM_Expiration; RGB ( 255; 0 ; 0 ) )
)

and the first option bring the english month name....(I have a french XP
version) and the second version, Date result is in this format mm/dd/yyyy...
the problem is I use "Use system format" and I use a french version of XP
and my setup is dd/mm/yyyy.

All this "zipelido" is to get a Color text based on the result.

I want to have a green text if the contract is valid and red text when
expired.
I also try to make the date field calculation result in color, but when a
result is a "date" the color is gone but work in text result.... and I also
whant to have a long date format in text.... dd mmmmm yyyy.
And I don't whant to use the replace fonction every time I need to have
french in my solution, this will make another and another and another to
many calculation field !

Thank you

JF



Reply With Quote
  #2  
Old   
Ursus
 
Posts: n/a

Default Re: Month name problem - 04-01-2007 , 04:10 AM







"JF" <bizouman_takethisout (AT) hotmail (DOT) com> schreef in bericht
news:6VEPh.41935$VN1.493918 (AT) wagner (DOT) videotron.net...
Quote:
Hi

Everytime I have a good idea, FM8.5 come right back at me and force me to
forget about it....

I have a calculation field that return "text" inside that I have text with
merge in a "date" like this
cPPM_Expiration is a custom fonction OR I Also try a Calculation Field
(date)

Case (
cPPM_Expiration ? Get ( CurrentDate );TextColor("Contact will expired on "
& Day (cPPM_Expiration) & " " & MonthName ( cPPM_Expiration ) & " " & Year
( cPPM_Expiration );RGB (115;150;115));

cPPM_Expiration < Get ( CurrentDate );TextColor ( "The contract is
expired since " & cPPM_Expiration; RGB ( 255; 0 ; 0 ) )
)

and the first option bring the english month name....(I have a french XP
version) and the second version, Date result is in this format
mm/dd/yyyy... the problem is I use "Use system format" and I use a french
version of XP and my setup is dd/mm/yyyy.

All this "zipelido" is to get a Color text based on the result.

I want to have a green text if the contract is valid and red text when
expired.
I also try to make the date field calculation result in color, but when a
result is a "date" the color is gone but work in text result.... and I
also whant to have a long date format in text.... dd mmmmm yyyy.
And I don't whant to use the replace fonction every time I need to have
french in my solution, this will make another and another and another to
many calculation field !

Thank you

JF
Create your own calculation

cMois <Text ;
Choose ( month ( currentdate ) ;
"" ; "Janvier" ; "Février" ; "Mars" ; "Avril" ; "Mai" ; "Juin" ; "Juillet" ;
"Août" ; "Septembre" ; "Octobre" ; "Novembre" ; "Décembre") >

And use this as your base for the names.

I don't think you are re-using those dates, so displaying them as text would
be the solution an create no problems. I use numbers and dates as text all
the time for displaying purposes.

Keep well, Ursus




Reply With Quote
  #3  
Old   
JF
 
Posts: n/a

Default Re: Month name problem - 04-01-2007 , 10:22 AM



OK thank you, j'avais pas pensé d'utiliser cette fonction !!



"Ursus" <ursus.kirk (AT) wanadoo (DOT) nl> a écrit dans le message de news:
460f76fe$0$55969$dbd43001 (AT) news (DOT) wanadoo.nl...
Quote:
"JF" <bizouman_takethisout (AT) hotmail (DOT) com> schreef in bericht
news:6VEPh.41935$VN1.493918 (AT) wagner (DOT) videotron.net...
Hi

Everytime I have a good idea, FM8.5 come right back at me and force me to
forget about it....

I have a calculation field that return "text" inside that I have text
with merge in a "date" like this
cPPM_Expiration is a custom fonction OR I Also try a Calculation Field
(date)

Case (
cPPM_Expiration ? Get ( CurrentDate );TextColor("Contact will expired on
" & Day (cPPM_Expiration) & " " & MonthName ( cPPM_Expiration ) & " " &
Year ( cPPM_Expiration );RGB (115;150;115));

cPPM_Expiration < Get ( CurrentDate );TextColor ( "The contract is
expired since " & cPPM_Expiration; RGB ( 255; 0 ; 0 ) )
)

and the first option bring the english month name....(I have a french XP
version) and the second version, Date result is in this format
mm/dd/yyyy... the problem is I use "Use system format" and I use a french
version of XP and my setup is dd/mm/yyyy.

All this "zipelido" is to get a Color text based on the result.

I want to have a green text if the contract is valid and red text when
expired.
I also try to make the date field calculation result in color, but when a
result is a "date" the color is gone but work in text result.... and I
also whant to have a long date format in text.... dd mmmmm yyyy.
And I don't whant to use the replace fonction every time I need to have
french in my solution, this will make another and another and another to
many calculation field !

Thank you

JF

Create your own calculation

cMois <Text ;
Choose ( month ( currentdate ) ;
"" ; "Janvier" ; "Février" ; "Mars" ; "Avril" ; "Mai" ; "Juin" ; "Juillet"
; "Août" ; "Septembre" ; "Octobre" ; "Novembre" ; "Décembre")

And use this as your base for the names.

I don't think you are re-using those dates, so displaying them as text
would be the solution an create no problems. I use numbers and dates as
text all the time for displaying purposes.

Keep well, Ursus




Reply With Quote
  #4  
Old   
Remi-Noel Menegaux
 
Posts: n/a

Default Re: Month name problem - 04-01-2007 , 11:35 AM



JF meant : "OK, thank you, I did not think of using that function"
Remi-Noel


"JF" <bizouman_takethisout (AT) hotmail (DOT) com> a écrit dans le message de news:
37QPh.4376$ig1.41054 (AT) weber (DOT) videotron.net...
Quote:
OK thank you, j'avais pas pensé d'utiliser cette fonction !!



"Ursus" <ursus.kirk (AT) wanadoo (DOT) nl> a écrit dans le message de news:
460f76fe$0$55969$dbd43001 (AT) news (DOT) wanadoo.nl...

"JF" <bizouman_takethisout (AT) hotmail (DOT) com> schreef in bericht
news:6VEPh.41935$VN1.493918 (AT) wagner (DOT) videotron.net...
Hi

Everytime I have a good idea, FM8.5 come right back at me and force me
to forget about it....

I have a calculation field that return "text" inside that I have text
with merge in a "date" like this
cPPM_Expiration is a custom fonction OR I Also try a Calculation Field
(date)

Case (
cPPM_Expiration ? Get ( CurrentDate );TextColor("Contact will expired on
" & Day (cPPM_Expiration) & " " & MonthName ( cPPM_Expiration ) & " " &
Year ( cPPM_Expiration );RGB (115;150;115));

cPPM_Expiration < Get ( CurrentDate );TextColor ( "The contract is
expired since " & cPPM_Expiration; RGB ( 255; 0 ; 0 ) )
)

and the first option bring the english month name....(I have a french XP
version) and the second version, Date result is in this format
mm/dd/yyyy... the problem is I use "Use system format" and I use a
french version of XP and my setup is dd/mm/yyyy.

All this "zipelido" is to get a Color text based on the result.

I want to have a green text if the contract is valid and red text when
expired.
I also try to make the date field calculation result in color, but when
a result is a "date" the color is gone but work in text result.... and I
also whant to have a long date format in text.... dd mmmmm yyyy.
And I don't whant to use the replace fonction every time I need to have
french in my solution, this will make another and another and another to
many calculation field !

Thank you

JF

Create your own calculation

cMois <Text ;
Choose ( month ( currentdate ) ;
"" ; "Janvier" ; "Février" ; "Mars" ; "Avril" ; "Mai" ; "Juin" ;
"Juillet" ; "Août" ; "Septembre" ; "Octobre" ; "Novembre" ; "Décembre")

And use this as your base for the names.

I don't think you are re-using those dates, so displaying them as text
would be the solution an create no problems. I use numbers and dates as
text all the time for displaying purposes.

Keep well, Ursus






Reply With Quote
  #5  
Old   
Helpful Harry
 
Posts: n/a

Default Re: Month name problem - 04-01-2007 , 04:10 PM



In article <6VEPh.41935$VN1.493918 (AT) wagner (DOT) videotron.net>, "JF"
<bizouman_takethisout (AT) hotmail (DOT) com> wrote:

Quote:
Hi

Everytime I have a good idea, FM8.5 come right back at me and force me to
forget about it....

I have a calculation field that return "text" inside that I have text with
merge in a "date" like this
cPPM_Expiration is a custom fonction OR I Also try a Calculation Field
(date)

Case (
cPPM_Expiration ? Get ( CurrentDate );TextColor("Contact will expired on "
& Day (cPPM_Expiration) & " " & MonthName ( cPPM_Expiration ) & " " & Year
( cPPM_Expiration );RGB (115;150;115));

cPPM_Expiration < Get ( CurrentDate );TextColor ( "The contract is expired
since " & cPPM_Expiration; RGB ( 255; 0 ; 0 ) )
)

and the first option bring the english month name....(I have a french XP
version) and the second version, Date result is in this format mm/dd/yyyy...
the problem is I use "Use system format" and I use a french version of XP
and my setup is dd/mm/yyyy.

All this "zipelido" is to get a Color text based on the result.

I want to have a green text if the contract is valid and red text when
expired.
I also try to make the date field calculation result in color, but when a
result is a "date" the color is gone but work in text result.... and I also
whant to have a long date format in text.... dd mmmmm yyyy.
And I don't whant to use the replace fonction every time I need to have
french in my solution, this will make another and another and another to
many calculation field !

Thank you

JF
I can't see anything wrong with the main part of the text calculation.
This:

"Contact will expired on " & Day(cPPM_Expiration) & " "
& MonthName(cPPM_Expiration) & " " & Year(cPPM_Expiration)

should work perfectly, as long as cPPM_Expiration is a Date field or a
Calculation field with a Date result.

If cPPM_Expiration is a Text field, then using the MonthName function
is meaningless.

Take the colour-changing bits out and you should see that it works.


Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)


Reply With Quote
  #6  
Old   
JF
 
Posts: n/a

Default Re: Month name problem - 04-01-2007 , 05:28 PM



No the main problem is cPPM_Expiration is a custom fonction.... so you can't
assign a result type to that.

But Ursus solution work fine.... )

JF


"Helpful Harry" <helpful_harry (AT) nom (DOT) de.plume.com> a écrit dans le message de
news: 020420070910002293%helpful_harry (AT) nom (DOT) de.plume.com...
Quote:
In article <6VEPh.41935$VN1.493918 (AT) wagner (DOT) videotron.net>, "JF"
bizouman_takethisout (AT) hotmail (DOT) com> wrote:

Hi

Everytime I have a good idea, FM8.5 come right back at me and force me to
forget about it....

I have a calculation field that return "text" inside that I have text
with
merge in a "date" like this
cPPM_Expiration is a custom fonction OR I Also try a Calculation Field
(date)

Case (
cPPM_Expiration ? Get ( CurrentDate );TextColor("Contact will expired on
"
& Day (cPPM_Expiration) & " " & MonthName ( cPPM_Expiration ) & " " &
Year
( cPPM_Expiration );RGB (115;150;115));

cPPM_Expiration < Get ( CurrentDate );TextColor ( "The contract is
expired
since " & cPPM_Expiration; RGB ( 255; 0 ; 0 ) )
)

and the first option bring the english month name....(I have a french XP
version) and the second version, Date result is in this format
mm/dd/yyyy...
the problem is I use "Use system format" and I use a french version of XP
and my setup is dd/mm/yyyy.

All this "zipelido" is to get a Color text based on the result.

I want to have a green text if the contract is valid and red text when
expired.
I also try to make the date field calculation result in color, but when a
result is a "date" the color is gone but work in text result.... and I
also
whant to have a long date format in text.... dd mmmmm yyyy.
And I don't whant to use the replace fonction every time I need to have
french in my solution, this will make another and another and another to
many calculation field !

Thank you

JF

I can't see anything wrong with the main part of the text calculation.
This:

"Contact will expired on " & Day(cPPM_Expiration) & " "
& MonthName(cPPM_Expiration) & " " & Year(cPPM_Expiration)

should work perfectly, as long as cPPM_Expiration is a Date field or a
Calculation field with a Date result.

If cPPM_Expiration is a Text field, then using the MonthName function
is meaningless.

Take the colour-changing bits out and you should see that it works.


Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.