Topics Search

Convert Numeric Value to Date

Convert Numeric Value to Date
Views: 2
I’m having some difficulty trying to convert a numeric value into a date.

The table is link to a txt field. I’m unable to change the data type.

The numeric value that I’m working with looks like “20080911”

I tried using formula:

Format(DateSerial(Left([due date],4),Mid([due date],5,2),Right([due date],2)),"y-mm-dd")

When I run the query, I received the dreaded “Data mistype” error message.
Sponsored Links:

More topics


Convert a date to a numeric value

In Access 2003/XP/2000/97, how do you change the date into a numeric value?

Date Conversion

I am trying to convert a date in the text format to Date format using the CDate() function in a sql query in MS Access, which is working fine. But when I try to export the results to a an excel file, the date is being displayed as text field again.

How do I correctly convert & format the text values and then export the values as Date (Numeric) in to Excel?

And the date is in the UK format 'dd/mm/y'

Convert date format yyyymmdd for datediff

I am trying to convert a numeric date formated yyyymmdd to a format that the DateDiff function will accept.

Convert Text and Numeric in query

I have a query the appends an access database from an excel spreadsheet (via a link in Access) taken from another program. My problem is that one of the excel columns contains both text and numeric data and I keep getting a 'data mismatch'. I would like to convert both to text I have tried a number of options
exp2:csng([Zip Code])
exp2:Str([Zip Code])
none seem to work

Sql to convert date into different format

I have a column within a table (Lead) where the current date (CreatedDate) format is 2011-04-04T17:24:57.000Z. I'm looking to convert this to mm/dd/y. I tried to use convert, but I fear I'm using this incorrectly.

Converting date field in numbers

I need to convert a date to a number that could be reconverted again in the original date, and -here's the point- I need to convert it to 0 if it's blank.

Varchar to Date SQL SERVER

Am a newbie to SQL server and finding it difficult to convert a varchar field to date (was easy in Access!)

I have a field in Table1 called Opened which gives a string dd/mm/y in varchar (10) format.

I wish to convert this to date and have tried various methods of which don't work. e.g.


I have also tried CONVERT CAST without success.

Converting a Text Date String to a Date for Calculations

I'm just jumping into Access and have the following question. In my Purchase Order Table, I have a date field calcualated as text, i.e. "01/12/04". I need to convert this to a date format in my queries so I can do calculations, i.e. 01/12/04 - 01/05/04 = 7 days. Can someone help me with how to convert this text date to a date format

Convert Number to a Date (Access 2007)

I have a CSV file that I import into an access database. The date field in the CSV file is in the format of 20100622 for 06/22/2010. How do I convert this field into a date field so that it will read as a date field? Once it is converted to a date, the field will need to be linked to another date in a different table. So the field types both have to be a date.

numeric convert into text by using Access table

I just want to know how numeric convert into text by using Access table