Microsoft
Software
Hardware
Network
Question : Quotation marks and # signs around variable dates and date parts
intYearLoop is the year in integer in a range of years
strYear is the same value in a string
dteStartDate = ("#1 / 1 / " & intYearLoop & "#") and any of about 10 other ways I have tried this all give me an error 13, data type mismatch.
I need to have the rst contain all values in a given year, which changes with the for/next loop.
This is used in a for/next loop from 2006 to whatever year it is currently. (Yes, it is now 2010.)
dtestartdate is set as a date datatype. It works everywhere else.
What is wrong here and/or does anyone have the total truth or documentation on these pesky dates!
Susan
Answer : Quotation marks and # signs around variable dates and date parts
use this
dteStartDate = DateSerial(intYearLoop, 1, 1)
Random Solutions
Bonus points for question
In VFP how can you locate what windows users have use of a table or exclusive use of the table
Can i modify uptime of machine?
what is causing "too few parameters. Expect 1.
Binding ComboBox to ObserveableCollection: SelectedItem after deleting item from Collection
4 public folder instances remain after running moveallreplicas.ps1 How to remove or move?
Dynamic and Static Resources in Silverlight
Is it possible to create a "Quick Find" button in Excel? (I need to make searching idiot proof.)
How do I check if a table exists, before creating the table...
SBS 2003 - Question on CALs