ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   What is Date() equivalent in Excel? (https://www.excelbanter.com/excel-programming/367749-what-date-equivalent-excel.html)

Ronald S. Cook

What is Date() equivalent in Excel?
 
I'm trying to write SQL within Excel. I'm used to Date() and Now() but
those don't seem to work. Can anyone tell me the equivalent?

Thanks,
Ron



Jim Thomlinson

What is Date() equivalent in Excel?
 
Not 100% sure what you are up to, but you can try Today()... If you want a
text string to embed in a SQL statement then you can use

format(Now(), "yyyyddmm") in VBA or
Text(now(), "yyyyddmm") in Excel
--
HTH...

Jim Thomlinson


"Ronald S. Cook" wrote:

I'm trying to write SQL within Excel. I'm used to Date() and Now() but
those don't seem to work. Can anyone tell me the equivalent?

Thanks,
Ron





All times are GMT +1. The time now is 02:56 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com