Microsoft Excel

Excel Lookup – Maintain Date Format

Consider the following spreadsheet in Excel:

I wish to perform a lookup on these fields to build a dirty INSERT into SQL list, however when I reference Cell A1 the date is converted into a number, like seen in the following Excel formula:

which outputs the following:

I need the eventdate to reference the date as per the spreadsheet above. ie:

To achieve this in Excel, use the TEXT function with the following format:

I hope this helps!

Share on Google Plus


Australian. Sport. Passionate Cricket Fan. Go Pro. Abseiling. Snorkeling. Travel. Golf R. SQL Server Developer. Three sons. One daughter. Last Trip: Tasmania.

Leave a comment

Your email address will not be published. Required fields are marked *