1

I am trying to convert a date to a number.

I need to have in my table a field with default value based on a date.

So if today is 23/01/2018, I want to have a number look like this 23012018.

Any ideas?

1 Answer 1

1

You can use the format command like this:

=Format$(Date, "ddmmyyyy")
Sign up to request clarification or add additional context in comments.

1 Comment

This will leave the data as a date type. If you want to store the information as a number you will have to convert it to a number, but if you do, it will remove any leading zeros. The other option is to change the formatted date type to a string type possibly using cstr

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.