• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

timestamp or datetime, which one is more efficent for comparsion?

 
raminaa niilian
Ranch Hand
Posts: 551
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Thank you for reading my post
can you please let me know which one of timestamp or datetime is more efficent and portable?
We need to store timestamp of an event in database so we can use one of timestamp or date time, which one is more efficent?
which is faster in comparsion and easier to port to other databases?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are we talking about SQL Server here?
 
raminaa niilian
Ranch Hand
Posts: 551
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Thank you for reply.
Yes i am using sqlserver

Thanks
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In which case datetime and timestamp represent very different things. The most important difference is that timestamps in SQL Server are not used to store dates and times. They store binary numbers used in row versioning. If you need a datatype to store a date time value, use datetime.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic