>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)