Monday, September 27, 2010

Data imported from SAP converts dates to text

It is a common problem to find that when you import data from other data sources into Excel, the dates are converted to text. Most times this is data being retrieved for the monthly reporting cycle and there are very strict deadlines to produce the management reports. Most Business Analysts spend their nights in the office to address such mundane problems.

Date problems are best addressed using a combination of Excel Date and Text functions. Sometimes you may need to incorporate a Excel Boolean functions. An example is =IF(ISERROR(DATE(YEAR(D2),MONTH(D2),DAY(D2))),DATE(RIGHT(D2,4),LEFT(D2,2),MID(D2,4,2)),DATE(YEAR(D2),MONTH(D2),DAY(D2)))

No comments:

Post a Comment