0

I am quite new to VBA and I would like to understand what the function is of the # in this string:

"#" & Format(dteLOOP, "mm/dd/yyyy") & "#," 
Cindy Meister
  • 25,071
  • 21
  • 34
  • 43

2 Answers2

2

The # is the delimiter for date/time literals in Access-SQL, or, as HansUp pointed out in the comments, in VBA code.

AHeyne
  • 3,377
  • 2
  • 11
  • 16
  • So the entire thing must be about [composing a query via concatenation](https://stackoverflow.com/q/332365/11683). – GSerg Oct 11 '19 at 18:21
  • `#` is also used to delimit Date/Time literal values in VBA code, e.g. `Dim MyDate As Date : MyDate = #2019-12-25#` – HansUp Oct 11 '19 at 18:33
1

Here & operator is concatenating strings. There is no significance for "#". The expected output will have a "#" before and after.

for example:

the date will be : #10/11/2019#,

Pavan Chandaka
  • 11,671
  • 5
  • 26
  • 34