(RADIATOR) AcctColumnDef for MySQL datetime type

Hugh Irvine hugh at open.com.au
Mon Jun 3 15:42:57 CDT 2002


Hello Viraj -

You would use the DateFormat specification:

	DateFormat %Y-%m-%d %X

and then the following AcctColumnDef

	AcctColumnDef TIME_STAMP, Timestamp, integer-date

This is from section 6.28.13 in the Radiator 3.1 reference manual.

 integer-date

 The attribute value will be converted from Unix seconds to an SQL datetime 
string using the date formatting characters described in Date Formatting . 
The Format field will be used as the date format (if it is present) otherwise 
the standard DateFormat parameter for this AuthBy SQL will be used (which 
defaults to the format `Sep 3, 1995 13:37'). This is useful for inserting the 
Timestamp attribute as an SQL datetime type. The default is compatible with 
at least MySQL, Microsoft SQL and Sybase datetime columns. If it is not 
suitable for your database, consider definining your own DateFormat paramter 
for this AuthBy SQL.


regards

Hugh


On Tue, 4 Jun 2002 03:57, Viraj Alankar wrote:
> Hello,
>
> What would be the proper way to insert the Timestamp from accounting into a
> MySQL datetime field? Basically it requires format of '0000-00-00 00:00:00'
> but I cannot seem to figure out how to do this with the date formatting.
> There is no format specifier for month with preceeding 0.
>
> Viraj.
> ===
> 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.

-- 
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. Available on *NIX, *BSD, Windows 95/98/2000, NT, MacOS X.
-
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.
===
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