Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个表,它不断在 SQL 数据库中记录错误,并使用以下格式的时间戳记录它
2012-09-05 13:46:59.383
我怎样才能从这个错误日志中只提取最后 48 小时?
如果这是用于 Sql Server,请尝试
Select * from myLog where datediff(h, myTimestamp, getdate()) < 48