Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have the formula =RANDBETWEEN(DATE(1930,1,3),NOW()-1) in a cell to give me a random date. I have the format of the cell set to a date so the random number looks like a date. For example 38562 looks like 7/29/2005. So far so good, however when I use the value in another formula is shows 38562 not 7/29/2005...

So =CONCATENATE("INSERT INTO random.#persons(birth_date) VALUES ('",L1,"');") fails as the birth_date isn't in a date format. How can I convert an number into a date?

share|improve this question
up vote 0 down vote accepted

Try =TEXT(Date_Number, "mm/dd/yyyy") (function reference).

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .