Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
7 replies
Subscribers
8 subscribers
Views
3972 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
I need to build a numeric string for a time stamp of exactly YYYYMMDDHHMMSSCCC
joep45
over 9 years ago
I need to build a numeric string for a time stamp of exactly YYYYMMDDHHMMSSCCC
Is there an alternative to using if() statements on everything in order to force 07 for the month of July, 09 for 9am etc
The person who developed the corresponding program showed me the c# code which uses padleft to insert 0s but appian padleft only allows for spaces to be inserted. Is there any other function to save from having 6 if() statements to generate this string?
OriginalPostID-158950
OriginalPostID-158950
Discussion posts and replies are publicly visible
0
chase.putnam
over 9 years ago
Hi Joe,
Appian has its own expressions and functions for manipulating datetime values:
forum.appian.com/.../Date_and_Time_Functions.html
and for creating strings:
forum.appian.com/.../Scripting_Functions.html
Appian and any custom plugins you may develop would use Java and not C# as well, so you could investigate the Java runtime API and any third party, open source Java libraries you may need for your implementation case.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
joep45
over 9 years ago
I'm using the appian date functions but for example month(now()) returns 7 when i need 07 i can wrap it in an if statement but is there some other way?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
chase.putnam
over 9 years ago
You could look at the explicit formatting available in the general text() function in Appian:
forum.appian.com/.../Text_Functions.html
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ashokv
A Score Level 1
over 9 years ago
Hi Joe, you can try using the text() function for the required format..eg:text(month(now()),"00")...will give u 07 instead of 7
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
narasimhaadityac
A Score Level 2
over 9 years ago
Hi Joe, check if you can try to use the displayValue function.. instead of using the if function and padding 0's
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ashish.deshmukh
A Score Level 1
over 9 years ago
Hi Joe, This can be achieved using text function. Try this
text(now(),"ddmmyyyyhhmmss") you can replace now() with your timestamp
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
georgec890
over 9 years ago
the text(today(),ddmmyyyy") did the job for me. Thanks guys. Great community.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel