I wonder how to format a date M/D/YY to the format YYYY-MM-DD? Best of all would be if I can do the format in the sql statement that I send to an access database to get the date.<br><br>Thanks,<br><br>Ludde
As Daniel's example shows, you can have the date value returned in your recordset if your database supports it (not all do). <br><br>VBscript has a FormatDate function, but you have to use one of the predefined formats. Otherwise, you have to do it manually.<br> <p>nick bulka<br><a href=mailto: > </a><br><a href= > </a><br>
Just putting in my 2 cents<br><br>Having worked with Access database for years I found that if you want to put a date in a field with the "Date" type <br>I use the following with excellent results<br><br>rs!MyDateField = Format(now(),"mm/dd/yy"<br><br>Access does not like it any other way.<br>Now if you want the date to Appear as 2000-07-06 then format the output not the input. <p>DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you be more productive.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.