Several custom functions about the date

xiaoxiao2021-03-06  61

1. Return to the date of the day of the day: Known Date Function Monthdays (DTALOCAL) MONTHDAYS = Datediff ("D", DTALOCAL, DATEADD ("M", 1, DTALOCAL) End Function Note: This function is bug, please do not use! Please use the second method below to get the number of days .2. Return date The number of days of the day: known year, month Function Monthdays (inty, INTM) MONTHDAYS = day (DateSerial (inty, INTM 1, 0)) End Function such as 2004 In February, INTY = 2004, INTM = 2 Get 29 Note: This method is from http://dev.9cbs.net/Article/54/54074.SHTM Unpredict Monthdays (2004, 12)

转载请注明原文地址:https://www.9cbs.com/read-84911.html

New Post(0)