dongmu1914 2016-03-03 20:51
浏览 76
已采纳

查找月中任何工作日的最后一天

I am trying to determine if a given date is the last day of that type (Sunday, Monday, Tuesday, etc.) in its month. For example, for March of 2016, the last Friday of the month is the 25th.

Please note I am not trying to figure out what the last day of the month is. Also, 'weekday' in the question refers to any of the 7 days, not just non-weekend days.

I am using excel and php as tags because I can work with either approach.

  • 写回答

1条回答 默认 最新

  • dskm94301 2016-03-03 21:09
    关注

    Just determine how close the given date is to the end of the month. For the given date in A1, use:

    =IF(DATE(YEAR(A1),MONTH(A1)+1,0)-A1<7,TRUE,FALSE)
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 (标签-MATLAB|关键词-多址)
  • ¥15 关于#MATLAB#的问题,如何解决?(相关搜索:信噪比,系统容量)
  • ¥500 52810做蓝牙接受端
  • ¥15 基于PLC的三轴机械手程序
  • ¥15 多址通信方式的抗噪声性能和系统容量对比
  • ¥15 winform的chart曲线生成时有凸起
  • ¥15 msix packaging tool打包问题
  • ¥15 finalshell节点的搭建代码和那个端口代码教程
  • ¥15 Centos / PETSc / PETGEM
  • ¥15 centos7.9 IPv6端口telnet和端口监控问题