最近公司HR和Finance想算员工的工作天数,想让我帮忙写些VBA,自己从网上找了下代码,自己再改改,以下来自网络. 计算两个日期之间的工作日,用VBA,因量大,最好用数组做 Sub kk() Dim arr, i&, j&, m& arr = Sheet2.Range("b3:f4") To UBound(arr) m = ) ) Next arr(i, ) = m Next Sheet2.Range() = arr End Sub 根据他提供的方法,其实就
可以用pg自带函数select extract(dow from current_date),之所以没用主要是展示一下通过数学方法计算日期的原理. drop function if exists getDateWeek(date);drop function if exists intervalDay(date);drop function if exists getMonMaxDay(integer,integer);drop function if exists getMonMaxDate(
SQL取出 所有周六 周日的日期 create table SatSun([id] int identity(1,1),[date] datetime,[weekday] char(6)) go declare @datetime datetime,@weekday char(6) set @datetime='2007-1-1' while @datetime<='2007-12-31' begin select @weekday=datename(weekday,@datetime) if
类:Vacation package test; import java.io.Serializable; import java.util.Date; public class Vacation implements Serializable { private static final long serialVersionUID = 1L; private Date date; private int days; public Date getDate() { return date; }
Code highlighting produced by Actipro CodeHighlighter (freeware)-->去掉法定节假日(周六,周天)和指定节假日 USE [DBName] GO /****** 对象: Table [dbo].[T_SYS_Holiday] 脚本日期: 11/08/2010 16:04:27 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO
1.假期实体类: package com.smics.date; import java.io.Serializable; import java.util.Date; public class Vacation implements Serializable { private static final long serialVersionUID = 1L; private Date date; private int days; public Date getDate() { return