Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
TToBin()
Message
De
15/07/2004 12:55:27
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00924766
Message ID:
00924770
Vues:
10
>Anyone know of a way to convert a datetime to a binary?
>
>A Datetime is stored as 8 bytes so I should be able to convert it to an 8 byte string and back again.
>
>Any ideas?
>
>Cheers,
> Nick

Pressumably to save space. I think you will have to make two UDF for that, concatenating the individual parts. I think the data in the field is stored more or less like this - one byte each for century, year, month, day, hour, minute, second, 1/100 second. For your own format, of course, you might use a different format - for instance, one that takes up even less space.

The functions you would use are year(), month(), day(), hour(), etc.; also bintoc() and ctobin().
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform