... v_ExpiryTime.toTime();
// yields
// 25-Mar-2020 20:41:07
// 25-Mar-2020 00:00:00
Example of splitting date-time value and then comparing:
v_CustomTime = "2020-03-25 20:41:07".toTime().toString("yyyy-MM-dd ...
... or account, and specifying the quantity for each.
How?
So depending on the number of levels, the count will be with a series if then else statements. See the results/yield section to determine ...
... = v_MyString.replaceAll("[^0-9]","");
// yields 123
The following is used in searches to escape special characters with a backslash:
v_MyString = "Joe's \"Amazing\" Skill & Sidekick (1)";
v_FormattedString ...
... is 17 minutes and 5 seconds ago
// then $v_Str = "17 minutes ago"
Or how about
$v_Str = getTimeAgo('-1 week 2 days 4 hours 2 seconds');
// yields "1 week ago"
$v_Str = getTimeAgo('last Monday');
// ...
... $v_Output = preg_replace("/[^a-z0-9\_]/", "_",$v_Output);
// replace any consecutive underscores to a single one (eg. "my_____test" yields "my_test")
$v_Output = preg_replace("#((\_))\\2+#", ...
... = v_PaymentTerms.getAlphaNumeric();
// yields CreditNote30Days
vPaymentTermsNum = v_PaymentTermsAlphaNum.removeAllAlpha()
// yields 30
But just to demo a regex and a one liner, here's a typical ...
What?
This code snippet took me a while to do and the documentation is flaky so I thought I'd make a note here just in case I need to refer to it again.
Why?
I want to modify a picklist and fill ...
... + v_NextRenewalDate.toString("MMMM, yyyy");
info v_ContractDateFormatted;
// yields Tuesday, 6th of November, 2018
Method #5:
if a list contains:
v_NextRenewalDate = '2018-11-06';
v_EnglishOrdinal ...
... with simplexml_load_string(). I get the above error when it is attempting to load an XML feed which is mostly in Spanish and breaks at the following XML node:
2
-> yields issue: PHP Warning: simplexml_load_string(): ...
What?
An article on how to quickly adapt an array code and sort by its values. Surprising how many examples are on the web and everyone saying you're doing it wrong... Which is true but quite unhelpful. ...
We use cookies to improve your experience on our website. By browsing this website, you agree to our use of cookies. Read more about our Privacy Policy.