• SQL 工齡計算


    select EmployeesList.*,datediff(year,EmployeesList.EmployeeEnterDate,getdate()) as 'InJobTime' from EmployeesList
    
    ---Geovin Du 塗聚文
    select EmployeesList.*,datediff(month,EmployeesList.EmployeeEnterDate,getdate()) as 'InJobTime' from EmployeesList
    
    select EmployeesList.*,datediff(month,EmployeesList.EmployeeEnterDate,getdate())/12 as 'InJobTime' from EmployeesList
    
    select EmployeesList.*,datediff(month,EmployeesList.EmployeeEnterDate,getdate())%12 as 'InJobTime' from EmployeesList
    ---工齡計算(前面整數是看多少年,小數點後兩位是多少個月)
    select EmployeesList.*,datediff(month,EmployeesList.EmployeeEnterDate,getdate())/12+datediff(month,EmployeesList.EmployeeEnterDate,getdate())%12*0.01 as 'InJobTime' from EmployeesList
    
    
    哲学管理(学)人生, 文学艺术生活, 自动(计算机学)物理(学)工作, 生物(学)化学逆境, 历史(学)测绘(学)时间, 经济(学)数学金钱(理财), 心理(学)医学情绪, 诗词美容情感, 美学建筑(学)家园, 解构建构(分析)整合学习, 智商情商(IQ、EQ)运筹(学)成功.---Geovin Du(涂聚文)
  • 相关阅读:
    SIP 研究 API中文
    关于“ARC forbids explicit message send of release”错误
    Android获取屏幕尺寸和密度
    ScrollView 判断滑动到底部
    搭建JAVA版的webService
    MTK 开发
    android 2D动画实现
    android notification详解
    android 监听电话来去电
    SharePoint
  • 原文地址:https://www.cnblogs.com/geovindu/p/2468752.html
Copyright © 2020-2023  润新知