how do you export dates into a query
how do you export dates into a query
Excel dates are stored as numbers from a reference point,
either you need to adjust the number by subtracting (or adding) a constant;
otherwise, if it is looking for a text date with slashes or hyphens then
you would have to format another cell as text
=TEXT(cellwithdate, "yyyy-mm-dd")
in VBA code it would be something like
strDate = FORMAT(datevariable,"yyyy-mm-dd")
strDate = Format(Date, "yyyy-mm-dd")
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm
"tires85" <[email protected]> wrote ...
> how do you export dates into a query
Thanks very much,
I will try this.
"David McRitchie" wrote:
> Excel dates are stored as numbers from a reference point,
> either you need to adjust the number by subtracting (or adding) a constant;
> otherwise, if it is looking for a text date with slashes or hyphens then
> you would have to format another cell as text
> =TEXT(cellwithdate, "yyyy-mm-dd")
> in VBA code it would be something like
> strDate = FORMAT(datevariable,"yyyy-mm-dd")
> strDate = Format(Date, "yyyy-mm-dd")
> ---
> HTH,
> David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
> My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
> Search Page: http://www.mvps.org/dmcritchie/excel/search.htm
>
> "tires85" <[email protected]> wrote ...
> > how do you export dates into a query
>
>
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks