Forum Discussion
BlakeHarrison
5 years agoQrew Captain
Rather than using the 'Part' function against a date field, you can use 'Month', 'Day', and 'Year'. I'd do something like this:
------------------------------
Blake Harrison
bharrison@datablender.io
DataBlender - Quickbase Solution Provider
Atlanta GA
404.800.1702 / http://datablender.io/
------------------------------
var number y = Year([Date Received]);
var text m = Right(ToText(100+Month([Date Received])),2);
var tex d = Right(ToText(100+Day([Date Received])),2);
"REQ" & List("-",[Record ID#],$y & $m & $d,[Source ID]
------------------------------
Blake Harrison
bharrison@datablender.io
DataBlender - Quickbase Solution Provider
Atlanta GA
404.800.1702 / http://datablender.io/
------------------------------
PaulEaston
5 years agoQrew Assistant Captain
Thank you Blake. Is there any disadvantage to use part, besides it being a bit of kludge? Any performance impacts? Just curious.
------------------------------
Paul Easton
------------------------------
------------------------------
Paul Easton
------------------------------
- BlakeHarrison5 years agoQrew CaptainNot in the grand scheme of things, no. Your formula accomplishes the same thing and in just about the same amount of formatting gymnastics. Your use of 'ToFormattedText' and 'Part' is fairly interchangeable with my option to add 100 to the Month/Day, convert it to text, and then pull off the last 2 characters using 'Right'.
------------------------------
Blake Harrison
bharrison@datablender.io
DataBlender - Quickbase Solution Provider
Atlanta GA
404.800.1702 / http://datablender.io/
------------------------------