想要使用Rest API获取今天的生日,但在端点中的Query中混淆 [英] Want to fetch Today Birthday Using Rest API ,But confuse in Query in Endpoint
本文介绍了想要使用Rest API获取今天的生日,但在端点中的Query中混淆的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
具有 列表TestList,具有Coloumn DOB,在此具有所有emplotyee数据,如其名称(Coloumn Name-" EmployeeName")& DOB(Coloumn Name- EmployeDOB)等。
想要获取生日为Todaay的员工姓名
即今天和今天月份,年份会有所不同
Shiv Sharma
Having a list TestList, having Coloumn DOB, In this having all emplotyee Data , like their Name (Coloumn Name- "EmployeeName") & DOB(Coloumn Name- EmployeDOB) etc.
Want to fetch Those Employee Name whose Birthday is Todaay
I.e Today Day And Today Month , Year will be different
Shiv Sharma
推荐答案
Hi Shiv,
Hi Shiv,
按照以下主题,只有粘贴的代码需要更改休息才能正常工作。
Follow the below thread only the pasted code need to change rest will work fine.
var currentMonth =(new Date()).getMonth()+1;
var todayDate= (new Date()).getDate().toString()
var listName="LRDBackup3june2016";
var fieldName="EmpDOB";
.ajax({
url:_spPageContextInfo.webAbsoluteUrl +" / _ vti_bin / listdata.svc /" + listName +"?
.ajax({ url: _spPageContextInfo.webAbsoluteUrl+"/_vti_bin/listdata.svc/"+listName+"?
filter = month(" + fieldName +")eq" + currentMonth and day(" + fieldName +")eq" + todayDate,
filter=month("+fieldName+") eq "+currentMonth and day("+fieldName+") eq "+todayDate,
这篇关于想要使用Rest API获取今天的生日,但在端点中的Query中混淆的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文