Hmm, that's interesting. Are you sure about the conversion of that value :-) ? The UNIX dates I've seen are seconds displacement from 01/01/1970. This one is clearly not.
In fact, based on those values, the base date appears to be '1972-03-02 13:51:36.000'. So, the function would be something like this:
CREATE FUNCTION convUnixDate (
@unixDate INT
)
RETURNS VARCHAR(24)
AS
BEGIN
RETURN DATEADD(SECOND, @unixDate, '1972-03-02 13:51:36.000')
END --FUNCTION
Main Topics
Browse All Topics





by: MikeWalshPosted on 2003-06-20 at 12:09:29ID: 8768978
I am not familiar with how Unix stores date/time.. Can you point me to the formula used to convert the time into a human friendly time? I suppose I could search the web, but I assume you know that piece of information?