View Single Post
  #11   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default Converting Text Values to Dates

On Tue, 8 Nov 2005 14:07:02 -0800, "Frank Winston"
wrote:

Is there a way to convert a column of text, date values (entered as 81096,
for example) to valid date format, 8/10/96? I could not get the DATEVALUE
function to do this.


It depends on what that date value represents.

If it represents 10 Aug 1996 then:

=DATE(MOD(A1,100)+1900+100*(MOD(A1,100)<30),INT(A1/10^4),MOD(INT(A1/100),100))

If it represents 8 Oct 1996 then:

=DATE(MOD(A1,100)+1900+100*(MOD(A1,100)<30),MOD(IN T(A1/100),100),INT(A1/10^4))

You could also try:

=--TEXT(A1,"00\/00\/00")

or

=DATEVALUE(TEXT(A1,"00\/00\/00"))

and see if the output is congruent with your regional settings.


--ron