Re: Entry of Incomplete Dates

From: George B (ghbennett_at_hotmail.com)
Date: 04/03/04


Date: Fri, 2 Apr 2004 20:26:28 -0500

Hi, Frank

The code is nothing special. The line of data being read:

Category;Nov 1;Nov 30;Change

    line = myfile.readline
    For j = 1 To 10000
        k = InStr(line, ";")
        If k > 0 Then
            dat = Left(line, k - 1)
            Cells(i, j).Value = dat
            line = Right(line, Len(line) - k)
        Else
            Cells(i, j).Value = line
            Exit For
        End If
    Next j

What happens: the data displays as "Nov 1", etc., but is actually stored as
being within the current year.
I was hoping I could specify a default year somehow which would apply in
this case. Otherwise, I suppose my only solution is to check every cell
which might contain a date for the year.

"Frank Kabel" <frank.kabel@freenet.de> wrote in message
news:#4yjHIvFEHA.3448@TK2MSFTNGP09.phx.gbl...
> Hi
> you may post the relevant part of your code which you're currently
> using for inserting the date fields
>
> --
> Regards
> Frank Kabel
> Frankfurt, Germany
>
>
> George B wrote:
> > I am attempting to extract data from a series of dated reports, using
> > a macro to insert data into various cells. Some of the data
> > represent dates, in the form 1-Nov or December 1. These appear to be
> > correct when viewing the work***, but I notice that the actual
> > entry in the cell is for this year, regardless of the year of the
> > report. Is there any way to specify a default year when the date is
> > incomplete?
>