Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calculating a number with dates
Message
 
À
10/12/1999 12:23:40
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00301801
Message ID:
00302555
Vues:
19
When dates are added or subtracted from one another you get a numeric.

mm=date()-date()-3
? type('mm')

Gives you 'N' as a type.

Are you trying to get 45 days from something?

__Stephen


>Hi all,
>
>I am having a problem doing some calculations and am not sure how to best get around it.
>
>I am trying to calculate number of days as follows:
>
>45-((date()-[date1])-[date2])
>
>The problem I am having is that the first part (date()-[date1] is evaluating to a number and then trying to subrtract the date from it which gives me a operator/operand type mismatch(of course) but how to I get around it, I mean is there a way to subtract 3 dates and getting a number at the end. I have tried changing the parenthesis to have it evalueate all the date fields first but can not seem to get by the error.
>
>Thanks for the help
>James
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform