Comments
3 comments
-
Hi there,
Many thanks for your post, although I am not entirely sure what you are looking for I am afraid.
SQL Data Generator will generate a date / time which is random on any column that uses the datetime datatype. From here, you can then choose the minimum and maximum date and select to randomize the time, without the need to use a regex.
Pete[/img] -
Sorry for my english.
The problem is that i don't have a datetime datatype. I have a varchar column.
It's possible to generate random DateTime between a range in varchar column? If Yes how to do this?
How to generate DateTime in a DateTime column?
Many thank's -
Hi there,
If you have a varchar column then you will indeed have to use a regex. Something like this will work, although provides dates a fair way back into the past and into the future:
(0[1-9]|[12][0-9]|3[01])[/](0[1-9]|1[012])[/](19|20)[0-9]{2}
It should be enough to get you going hopefully though!
HTH!
Pete
Add comment
Please sign in to leave a comment.
there is a method to generate random date time from a valid range?
If exists only the Regex method wich is the right regex expression to generate valid date?
Thank's