(RADIATOR) <SessionDatabase SQL>
Hugh Irvine
hugh at open.com.au
Wed May 16 19:15:43 CDT 2001
Hello Mariano -
If you use DateFormat and integer-date in the AcctColumnDef in your
AuthBy SQL clause, you can use any format that you wish with no
coding required.
Sorry - I should have thought of this earlier.
cheers
Hugh
At 16:09 -0300 16/5/01, Mariano Absatz wrote:
>El 16 May 2001, a las 22:40, Hugh Irvine escribió:
>
>> >
>> >So now I have it working, now for the "theoretical" part of the question,
>> >if I had a radius attribute with an arbitrary date-time in it (say, the
>> >birthday -and time- of the nas manufacturer's mother) and I would like to
>> >put it in a column in my on-line users database, what would be the idiom
>> >to do it so?. That is I understand (I think) how to put it in an
>> >accounting database by means of a
>> >
>> >AcctColumnDef DB_COLUMN,Radius-Attribute-Name,integer-date, \
>> > TO_DATE('%Y-%m-%d %H:%M:%S', 'YYYY-MM-DD HH24:MI:SS')
>> >
>> >but in the AddQuery (or AnythingQuery) I don't know how to use Radius-
>> >Attribute-Name here.
>>
>> For this you would have to write some code - probably in a hook. But
>> again, you need to understand if you are dealing with a numeric
>> number of seconds (as above), or whether you just have some string
>> that happens to represent a date in some ASCII format as you describe
>> for your database. They are very different representations of
>> (possibly) the same thing.
>>
>
>The point is, I have a numeric attribute representing an epoch, if I want
>to insert it into a database like oracle where the date is represented as
>something else, I have to translate the epoch to a string in a hook (e.g.
>generating a fake attribute) and then I can insert it as TO_DATE(%{My-New-
>Attr},'YYYY-MM-DD HH24:MI:SS')?
>
>In this hook, do I have a function to use the date formatting characters
>from section 6.3 in the manual?
>
>
>--
>Mariano Absatz - El Baby
>mailto:baby at baby.com.ar
>http://www.baby.com.ar/
> PGP KEYS: http://www.baby.com.ar/datos/personales.html#claves_pgp
> |\ _
> _\\/'> Powered by Pegasus Mail
> /|__) http://www.pmail.com
> ) )\
>-----------------------------------------------------------
>Double your drive space - delete Windows!
--
NB: I am travelling this week, so there may be delays in our correspondence.
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, Interbiller, TACACS+, PAM, external, etc, etc.
Available on Unix, Linux, FreeBSD, Windows 95/98/2000, NT, MacOS X.
===
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.
More information about the radiator
mailing list