Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

up vote 0 down vote accepted

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.