Understand timestamp field in HEX format in NAV table on SQL
Gabry
Member Posts: 48
Looking at NAV table on SQL Server Management Studio there is an interesting additional field called "timestamp". It seems that it it a hexadecimal format. I tried to convert it in a decimal format, but it does not represent a date format.
How can I read it?
For instance:
timestamp: 0x000000000009D302 (643842 converting it in a decimal format, but it does not seem a date format)
How do I translate it into a date format?
How can I read it?
For instance:
timestamp: 0x000000000009D302 (643842 converting it in a decimal format, but it does not seem a date format)
How do I translate it into a date format?
0
Comments
-
It is not date format, Nav use the timestamp as a row version.
Because timestamp increases by 1 for every modification in database, you can use a Change Log Entry table to find when record was changed last time.
Right now I'm checking when records in warehouse entry were changed
declare @bi bigint select @bi=cast(timestamp as bigint) from [company$warehouse entry] where [Entry No_]=10432001 select top 10 * from [company$change log entry] where cast(timestamp as bigint)>@bi order by cast(timestamp as bigint)
Looking for part-time work.
Nav, T-SQL.0 -
1. Find timestamp of record which you would like to check.
2. Find record with nearest timestamp in the Change Log Entry Table and look into "Date and Time" field
SQL code is below:).declare @bi bigint select @bi=cast(timestamp as bigint) from [company$warehouse entry] where [Entry No_]=10432001 select top 10 * from [company$change log entry] where cast(timestamp as bigint)>@bi order by cast(timestamp as bigint)
Looking for part-time work.
Nav, T-SQL.0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions