WEBI上取月的整週

2021-07-11 22:36:27 字數 1806 閱讀 3224

變數:輸入日期=currentdate()

變數:上月第一天 =if ((tonumber(formatdate([輸入日期];"mm"))-1)<=9) then (todate(formatdate([輸入日期];"yyyy")+"0"+(tonumber(formatdate([輸入日期];"mm"))-1)+"01";"yyyymmdd")) else (todate(formatdate([輸入日期];"yyyy")+(tonumber(formatdate([輸入日期];"mm"))-1)+"01";"yyyymmdd"))

變數: 上月最後一天=lastdayofmonth([上月第一天])

變數:系統日期-1 =if  daynumberofmonth([輸入日期]) = 1 then([上月最後一天]) else todate(formatdate([輸入日期];"yyyy")+"-"+formatdate([輸入日期];"mm")+"-"+(daynumberofmonth([輸入日期]) -1);"yyyy-mm-dd")

變數2:本月第一天是週幾=tonumber(daynumberofweek(todate(formatdate([系統日期-1];"yyyymm")+"01";"yyyymmdd")))

變數: 本月第一天 = todate(formatdate([系統日期-1];"yyyymm")+"01";"yyyymmdd")

變數 :本月第一天之周一 =formatdate(relativedate([本月第一天];-[本月第一天是週幾]+1); "mm") +"月" +formatdate(relativedate([本月第一天];-[本月第一天是週幾]+1); "dd") +"日----"

變數:本月最後一天:=tonumber(formatdate(lastdayofmonth([系統日期-1]);"dd"))

變數:本月最後一天是週幾

=tonumber(daynumberofweek(todate(formatdate([系統日期-1];"yyyymm")+tonumber(formatdate(lastdayofmonth([系統日期-1]);"dd"));"yyyymmdd")))

變數:本月最後一天之週末

=formatdate(relativedate([本月最後一天];7-[本月最後一天是週幾]); "mm") +"月" +formatdate(relativedate([本月最後一天];7-[本月最後一天是週幾]); "dd") +"日"

第一周第一天

= if [本月第一天是週幾] = 1 then ([本月]+"月"+"1日----") else ([本月第一天之周一])

第一周: =[第一周第一天] +[本月]+"月"+(7-[本月第一天是週幾]+1)+"日"

第二週第五周最後一天(判斷) = if(tonumber((7-[本月第一天是週幾]+29))>[本月最後一天 (數)]) then "[本月最後一天之週末]" else ([本月]+"月"+(7-[本月第一天是週幾]+29)+"日")

第六周最後一天(判斷)= if(tonumber((7-[本月第一天是週幾]+30))>[本月最後一天 (數)]) then " " else [本月最後一天之週末]

第五周: =if(tonumber((7-[本月第一天是週幾]+23))>[本月最後一天 (數)]) then " " else( ([本月]+"月"+(7-[本月第一天是週幾]+23)+"日----")+[第五周最後一天(判斷) ])

第六周 =if(tonumber((7-[本月第一天是週幾]+30))>[本月最後一天 (數)]) then " " else( ([本月]+"月"+(7-[本月第一天是週幾]+30)+"日----")+[第六周最後一天(判斷)])

拉取hadoop集群上的hdfs檔案

從hadoop集群拉取hdfs檔案是乙個常見的需求,基於org.apache.hadoop即可做到。但是hadoop包有個明顯的缺點是引用太多,經常需要排包,包括但不限於httpclient,servlet,slf4j,tomcat等等 service public class hdfsclient...

使用git拉取github上的專案

使用git免密上傳和拉取和github上的專案 首先你要去github上註冊你的使用者名稱密碼!git config global user.name 這裡換上你的使用者名稱 git config global user.email 這裡換上你的郵箱 git config global listss...

爬取前程無憂上的招聘資訊

這段時間公司人事部門需要爬取一些崗位資訊下來,利用空閒時間寫了個指令碼下來,如下。usr bin python from bs4 import beautifulsoup import csv import time import random import requests import sys ...