Hi,
I need to compare a date which is from database and data type is varchar to currentdate when select data.
The problem is the date field in database is varchar with format like yyymmdd, for example for today: 20101207. But the currentdate by default is 12/7/2010. I can’t change the format to the field in database before it is selected, so the only thing I can do is to change currentdate. I did ToText(), replace '/', after that I got 1272010. Or I can use Mid to reformat it to "2010127", but still won’t work since the field in database for today is "20101207".
How to make currentdate use double digits in month and day? I know you can do format field, but it doesn't change the default.
Sorry to bother twice in one day. Thank you for any helps!!!
I need to compare a date which is from database and data type is varchar to currentdate when select data.
The problem is the date field in database is varchar with format like yyymmdd, for example for today: 20101207. But the currentdate by default is 12/7/2010. I can’t change the format to the field in database before it is selected, so the only thing I can do is to change currentdate. I did ToText(), replace '/', after that I got 1272010. Or I can use Mid to reformat it to "2010127", but still won’t work since the field in database for today is "20101207".
How to make currentdate use double digits in month and day? I know you can do format field, but it doesn't change the default.
Sorry to bother twice in one day. Thank you for any helps!!!