Answered
dear all...
I want to convert the date to number string to calculate the Chinese year using Date2Num function, however, the value return is alway zero.
here is my script:
var nDateNum = Date2Num("$.formattedValue", "YYYY/MM/DD") var cYr = (Num2Date(nDateNum ,"YYYY") - 1911) var cMo = Num2Date(nDateNum,"MM") var cDay = Num2Date(nDateNum,"DD") $.rawValue = Concat(cYr,"年",cMo,"月",cDay,"日")
I've looked up many resourses from Internet and online help while I can't find out the solution!
Could someone have problem like mine before? Thanks so much!
did you check the pattern for the date field?
You can assign a pattern for chinese regions.
Select the date field and open the pattern menu in the value tab of the object palette.
Then select the region you need the pattern for and the one of the types that matched your needs.
date{YYYY'年'M'月'D'日'EEEE}
radzmar
• LoveCycle Blog
Documents you need:
• LiveCycle Designer ES2 Docs