Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Convert datetime to numeric?
Message
De
01/01/2001 22:46:05
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00458288
Message ID:
00458369
Vues:
18
>I have to working using a constant as the second datetime but I cannot get datetime() to take a parameter.
>I get a message saying too many parameters with the code below. I'm using vfp5.
>
>>>Is there a way to convert a datetime to a numeric value? Actually it needs to be negative but I can multiply by -1.
>>
>>subtract another datetime from the datetime
>>
>>lnCurrentTime = datetime() - datetime(1970, 1, 1) && equivalent to a C time_t

-(datetime() - {^1970-1-1 0:0:0})

or better

#define BASE_DATE_TIME {^1970-1-1 0:0:0}

-(datetime() - BASE_DATE_TIME)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform