CREATE OR REPLACE FUNCTION DIFFHOURTIME_WITHOUTHOLIDAY_FUN ( STARTTIME ), ENDTIME ) ) RETURNS DOUBLE LANGUAGE SQL NOT DETERMINISTIC EXTERNAL ACTION READS SQL DATA INHERIT SPECIAL REGISTERS -------------------------------------------------------------
CREATE FUNCTION Fun_GetTotalHourBySomeTime(@TaskId NVARCHAR(30),@Bu_trupstartDate NVARCHAR(50),@Bu_trupEndDate NVARCHAR(50)) RETURNS FLOAT ASBEGIN --计算工作日的天数 DECLARE @tStartDate DATE DECLARE @tEndDate DATE SET @tStartDate=CONVERT(NVARCHAR(50),@Bu_tru
Date ruZhi = new Date("入职年月bai"); Date now = new Date(); //算出du来时间夸格zhi多长 long shiChang = now.getTime()-now.getTIme(); //转换成天 int day = shiChang/(1000*60*24); //转换成想要dao的格式,这里zhuan定为1年=365天 1月=30天 //算出年 int year =day/365; day = day%365; //算出月 in
后台传来毫秒,前台转换成对应的时分秒 //在线时长 function longTime(seconds){ //总秒数 //seconds=seconds/1000; //得到小时 var hour = seconds/3600; var r = seconds%3600; var m = r/60; var s = r%60; return parseInt(hour)+":"+parseInt(m)+":"+parseInt(s); }
File source = new File("视频.mp4"); Encoder encoder = new Encoder(); try { MultimediaInfo info = encoder.getInfo(source); System.out.println("dura="+info.getDuration()); Date date = new Date(info.getDuration()); SimpleDateFormat sdf = ne