Обсуждение: Returning an integer from a date

Поиск
Список
Период
Сортировка

Returning an integer from a date

От
Rick Dearman
Дата:
I have a date field in a table, I want to create a function to manipulate this date, however I want the date to come to me as an integer.

Is this possible? Or do I have to get it as a char *string??
 
 

-- 
It said use Windows 95 or better, so I installed Linux!
 

Re: [GENERAL] Returning an integer from a date

От
Adriaan Joubert
Дата:
Rick Dearman wrote:
>
> I have a date field in a table, I want to create a function to
> manipulate this date, however I want the date to come to me as an
> integer.
>
> Is this possible? Or do I have to get it as a char *string??
>

Get it in a binary cursor and you can get it as a julian date (centred
around 2000). I handle all my dates as integers.

Adriaan

Re: [GENERAL] Returning an integer from a date

От
Herouth Maoz
Дата:
At 12:51 +0200 on 29/03/1999, Rick Dearman wrote:


>
>   I have a date field in a table, I want to create a function to
>manipulate this date, however I want the date to come to me as an integer.
>
> Is this possible? Or do I have to get it as a char *string??

What kind of an integer do you need? You could have the "milliseconds since
epoch" kind of number quite easily. Or do you need a number such as
19990301?

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma