Now() function with time trim

前端 未结 6 1028
忘了有多久
忘了有多久 2020-12-16 10:23

So the function =Now()....is there a way I can use this and only get the date, not the time?

or is there just a function for this idea?

6条回答
  •  [愿得一人]
    2020-12-16 11:01

    DateValue(CStr(Now()))
    

    That's the best I've found. If you have the date as a string already you can just do:

    DateValue("12/04/2012 04:56:15")
    

    or

    DateValue(*DateStringHere*)
    

    Hope this helps someone...

提交回复
热议问题