en-UShe-IL
You are here:   Blog
Register   |  Login

Blog Archive:

Maximize
* Can be used in order to search for older blogs Entries

Search in blogs


Blog Categories:

Maximize
* Can be used in order to search for blogs Entries by Categories

Blog Tags:

Maximize
* Can be used in order to search for blogs by keywords

TNWikiSummit


Awared MVP 


 


Microsoft® Community Contributor 


Microsoft® Community Contributor


 Read first, before you you use the blog! Maximize

Recent Entries

By ronen ariely on 07/05/2015 14:17

In this blog I will show step by step how I examined the DateTime2 data, in order to find the actual storing format. The basic process is based on reverse engineer by examining the binary data that we get in CONVERT to VARBINARY(16)

-- check the data as binary show us the format behind the scenes:
DECLARE @d DATETIME2 = '2016-02-27 00:00:00.000' -- My next birthday :-)
SELECT CONVERT(VARBINARY(16),@d)
GO
* Result: 0x070000000000143B0B

The goals in this blog are: (1) understand how DateTime2 stored in the database, (2) to provide a small glimpse on the process that we can use in order to examine what is going behind the scenes in the Page Data File (for specific data type).

By ronen ariely on 04/05/2015 17:36

There is a common confusion regarding "displaying format" and "storing format" of dates types. We can find lot of questions in the forums regarding "storing format" of dates, which are actually regarding the "displaying format", in external application.

For example questions like: I am getting the error “DateTime data type resulted in an out-of-range value”, or questions like: “how can I change the DateTime column format in the database”.

In this post I will I will focus on SQL DateTime type. I will organizes the issue using the different terms, and I will give some basic solutions for common issues.