Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cmonth
Message
De
23/06/1999 17:07:05
 
 
À
23/06/1999 17:03:29
Dovi Gilberd
Dovtware Consulting Inc
Miami, Floride, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Re: Cmonth
Divers
Thread ID:
00233028
Message ID:
00233214
Vues:
42
>>>this is my actual line of code
>>>
>>>my field is a character field and it comes from a harris PBX like this
>>>990501
>>>so if i apply this line of code to 990501 like such
>>>
>>>substr(view1.strtdate,3,2) + "/" + substr(view1.strtdate,5,2) + "/" + substr(view1.strtdate,1,2)
>>>
>>>i get 05-01-99
>>>i need to get May-01-99
>>
>>Right. So if you do this:
>>
>>dVar = CTOD(substr(view1.strtdate,3,2) + "/" + substr(view1.strtdate,5,2) + "/" + substr(view1.strtdate,1,2))
>>YourNewString = CMONTH(dVar)+'-'+substr(view1.strtdate,5,2)+'-'+substr(view1.strtdate,1,2)
>>
>>You should get:
>>
>>May-01-99 in the variable YourNewString.
>
>
>
>thank you much.....it did not work but i do not want to keep bothering you..
>im trying to place it on a report, thats what i did not tell you...

Well, then you can put this in the expression:

CMONTH(CTOD(substr(view1.strtdate,3,2)+"/"+substr(view1.strtdate,5,2)+"/"+substr(view1.strtdate,1,2)))+'-'+substr(view1.strtdate,5,2)+'-'+substr(view1.strtdate,1,2)


or you could create your own function to do this to a passed date and use your function in the report.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform