What is the purpose of these number signs around date value type?

后端 未结 2 1781
再見小時候
再見小時候 2021-01-01 08:04

Can anyone explain the correct usage/requirement of using these \'#\' number signs. Do they simply have to surround any date type in SQL?

Thanks

SELE         


        
2条回答
  •  北海茫月
    2021-01-01 08:46

    These are the MS Access syntax for date constants.

    In most other databases, you just use a string to represent a date. In my opinion, you should use one of the ISO standard formats for this (either YYYYMMDD or my preference YYYY-MM-DD). So a valid date in most databases would be '2014-01-01'. In Access, this can be written #2014-01-1#.

提交回复
热议问题