以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助] 再次求助 如何将日期转换成英文格式 用word模板生成 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=114770) |
||||
-- 作者:hofen2008 -- 发布时间:2018/2/21 23:06:00 -- [求助] 再次求助 如何将日期转换成英文格式 用word模板生成 月初在http://www.foxtable.com/bbs/dispbbs.asp?BoardID=2&ID=114404&skin=0咨询了如何根据日期生成英文格式的“月份”,但经过多次测试没有成功。 <!--[if gte vml 1]>
请老师帮忙看看附件项目和模板 能不能在模板中,根据月份自动生成英文的月份;性别是“男”显示MALE,“女”显示FEMALE |
||||
-- 作者:有点甜 -- 发布时间:2018/2/21 23:20:00 -- 1、
<mid([开始日期],9,2) & " " & iif(month([开始日期])=1,"jan",iif(month([开始日期])=8,"aug","其余自行添加")) & " " & mid([开始日期],1,4)>
2、
<iif([性别]="男", "male",iif([性别]="女", "female", ""))>
|
||||
-- 作者:hofen2008 -- 发布时间:2018/2/22 0:17:00 -- 测试无法成功,请老师帮忙检查一下是什么原因呢 代码: <mid([开始日期],9,2) & " " & iif(month([开始日期])=1,"January",iif(month([开始日期])=2,"February",iif(month([开始日期])=3,"March",iif(month([开始日期])=4,"April",iif(month([开始日期])=5,"may",iif(month([开始日期])=6,"june",iif(month([开始日期])=7,"july",iif(month([开始日期])=8,"August",iif(month([开始日期])=9,"September",iif(month([开始日期])=10,"October",iif(month([开始日期])=11,"November",iif(month([开始日期])=12,"December","")))))))))))) &
" " & mid([开始日期],1,4)> 测试无法成功,字符串参量过长。 生成模板: <mid(2017-12-11,9,2) & " " & iif(month(2017-12-11)=1,"January",iif(month(2017-12-11)=2,"February",iif(month(2017-12-11)=3,"March",iif(month(2017-12-11)=4,"April",iif(month(2017-12-11)=5,"may",iif(month(2017-12-11)=6,"june",iif(month(2017-12-11)=7,"july",iif(month(2017-12-11)=8,"August",iif(month(2017-12-11)=9,"September",iif(month(2017-12-11)=10,"October",iif(month(2017-12-11)=11,"November",iif(month(2017-12-11)=12,"December","")))))))))))) & " " & mid(2017-12-11,1,4)> |
||||
-- 作者:hofen2008 -- 发布时间:2018/2/22 0:18:00 -- 代码:<mid([开始日期],9,2) & " " & iif(month([开始日期])=1,"January",iif(month([开始日期])=2,"February",”MMMM”)) & " " & mid([开始日期],1,4)> 生成模板后:mid(2017-12-11,9,2) & “ “ & iif(month(2017-12-11)=1,”January”,iif(month(2017-12-11)=2,”February”,”MMMM”)) & “ “ & mid(2017-12-11,1,4) |
||||
-- 作者:有点甜 -- 发布时间:2018/2/22 8:55:00 -- 1、 <format([开始日期],"dd") & " " & iif(month([开始日期])=1,"jan","") & iif(month([开始日期])=2,"feb","") & iif(month([开始日期])=3,"mar","") & iif(month([开始日期])=4,"apr","") & iif(month([开始日期])=5,"may","") & iif(month([开始日期])=6,"jun","") & " " & format([开始日期],"yyyy")>
|