Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

data type conversion issue with date format

Status
Not open for further replies.

wheels27

MIS
Aug 26, 2002
30
US
i have a table with a currency and a date in the same column
and to get my currency to total in excel i need to remove the date but i cant. how do i get data type number to recognize the dat with out having problems. when it does not recognize it it deletes the rows with the date.
how do i reformat so it does not delete. NOTE: I have over 6000 records with this problem Ooops.
 
What is the datatype of the column with the combined currency and date data?
Is there a format for the data? By this I mean does the data have a consistent pattern such as "$nnn.nn mm/dd/yyyy".
 
yes there is a format to it the data type is text
but i have currency in there, with date and a text word.
i have figured i can covert the text word to a numeric value that has been solved but the dat is the prob.
the currency value is $0000.00 date value is 00/00/0000
how can i take the date and move it from the column it is in and create a new colum that i can move all the dates too
 
You can use some string functions to find the date and move it along as the format is consistent like 01/20/1999.
General idea.
Use instr() to find the first slash.
int1 = InStr(1, yourtextfield, "/")
Use mid() to move 10 characters from the field.
var2 = Mid(yourtextfield, int1 - 2, 10)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top