Quantcast
Channel: IT Tutorial
Viewing all articles
Browse latest Browse all 53

Random value for DATETIME column

$
0
0

Today, I am going to describe how to generate random value for DATETIME field within a given range. This is very useful specially for generating test data. For this, we will use couple of built-in functions like: DATEDIFF DATEADD RAND ROUND Random DATETIME Value DECLARE @startDate DATETIME -- start date DECLARE @endDate DATETIME -- end …

The post Random value for DATETIME column appeared first on IT Tutorial.


Viewing all articles
Browse latest Browse all 53

Trending Articles