Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Export data with unixt time stamp problem.....

Author  Topic 

The1Ash10
Starting Member

15 Posts

Posted - 2009-03-15 : 16:30:40
What I have is an event log that is exported to SQL Serve from another software. This event log is getting way too large (11 gigs or so) and I need to setup a task that will run every night to move anything greater than three days worth of data off to another database. Normally, I don't believe this would be an issue, but this event-log keeps its time-stamp Unix time.

I have been working with this problem for the last week or so, and can't see, to come up with anything that will work. I appreciate any help or direction that you can give me. If it would help, I can get some screen shots uploaded... Just let me know.

The problem I'm having doesn't seem like it would be a big deal for someone who is a more seasoned DBA, but I'm new the world of relational databases and having a little trouble.

The1Ash10
Starting Member

15 Posts

Posted - 2009-03-15 : 16:33:20
I'm not sure if you need more information that what I've given, but just let me know if I'm missing something. Thanks in advance for the help.
Go to Top of Page

The1Ash10
Starting Member

15 Posts

Posted - 2009-03-15 : 17:42:20
My problem is very much like this one posted on another forum.
http://help.wugnet.com/bravenet/webmaster/Unixtime-SQL-Help-ftopict47826.html
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2009-03-15 : 18:57:21
It would help if you could provide sample data you're trying to work with. The other post didn't have any that illustrates the exact problem either.
Go to Top of Page

The1Ash10
Starting Member

15 Posts

Posted - 2009-03-16 : 10:06:04
Is this what you're looking for?
[/URL][URL=http://upshizzle.com]][/URL]
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2009-03-16 : 10:41:15
Can you confirm if those log entries are from 11/30/2007, between 11:36 and 11:56 pm?

If so, you can use the following expression to turn them into SQL Server datetime:

SELECT DateAdd(s, time_stamp, '1/1/1970') FROM myTableName
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2009-03-16 : 10:42:26

The functions in this script can be used to convert to/from SQL Server date time to UNIX Time.
UNIX Time Conversion Functions:
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=66858

CODO ERGO SUM
Go to Top of Page
   

- Advertisement -