Home |
Search |
Today's Posts |
#1
|
|||
|
|||
space before date in csv files
I often have to import CSV files into excel and the files contain dates such as 1/2/05 12:22:12 PM The problem is that when I import them, there is a space before the date so it is not taking as a date unless I remove the space. I tried to use the "TRIM" command and it does take the space off, but it still won't recognize those values as dates for some reason. If I use the trim function and then copy the values only into another cell it still won't act as a date until I go in to edit the cell and then click out of it. Has anyone ever run into this and do you have any suggestions? -- birkato ------------------------------------------------------------------------ birkato's Profile: http://www.excelforum.com/member.php...o&userid=21011 View this thread: http://www.excelforum.com/showthread...hreadid=388751 |
#2
|
|||
|
|||
birkato,
=TRIM(A1)*1 will force the string that TRIM returns into a date (a number, actually). Simply format the cell with the formula as a date. HTH, Bernie MS Excel MVP "birkato" wrote in message ... I often have to import CSV files into excel and the files contain dates such as 1/2/05 12:22:12 PM The problem is that when I import them, there is a space before the date so it is not taking as a date unless I remove the space. I tried to use the "TRIM" command and it does take the space off, but it still won't recognize those values as dates for some reason. If I use the trim function and then copy the values only into another cell it still won't act as a date until I go in to edit the cell and then click out of it. Has anyone ever run into this and do you have any suggestions? -- birkato ------------------------------------------------------------------------ birkato's Profile: http://www.excelforum.com/member.php...o&userid=21011 View this thread: http://www.excelforum.com/showthread...hreadid=388751 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I create a schedule from a list of dates ? | Charts and Charting in Excel | |||
merging my excel files | Excel Discussion (Misc queries) | |||
Recurring annual events using a specific date as a trigger date | Excel Worksheet Functions | |||
Converting numbers to date format from csv files | Excel Discussion (Misc queries) | |||
Using formulas to determine date in one cell based on date in anot | Excel Worksheet Functions |