Showing entries with tag "Date".

Found 1 entries

Random MySQL Dates

Here is a good way to generate a random date that you can use in MySQL.

SELECT FROM_UNIXTIME(RAND() * 2147483648) AS MyDate;

or

INSERT INTO TableName (DateField) VALUES (FROM_UNIXTIME(RAND() * 2147483648));
Leave A Reply