> > I am looking for a way to convert the LASTLOGIN field in the database > > which is a UNIX timestamp to a standard time format and store it it in a > > field called CALCLOGIN. Any one had any success doing something > > similar?
The LASTLOGIN field actually stores the number of seconds since 1/1/1970 12:00AM GMT. You can use a SQL statement like this to do it (but change the number of seconds to subtract based on your time zone.) CONVERT(datetime, DATEADD(s,LASTLOGIN-18000,'1/1/1970 12:00 AM')) Also note that if the user has never logged in using webmail it will come up with a date in 1969. - Andy To Unsubscribe: http://www.ipswitch.com/support/mailing-lists.html List Archive: http://www.mail-archive.com/imail_forum%40list.ipswitch.com/ Knowledge Base/FAQ: http://www.ipswitch.com/support/IMail/
