Forum Discussion
MindaMay
6 years agoQrew Cadet
Yes, this is awesome... I ended up using two of your answers to get what I needed - YYMMDD
Here's what I have:
var date MyDate = ToDate([Date Created]);
var text MM = Right("0" & ToText(Month(ToDate([Date Created]))),2);
var text DD = Right("0" & ToText(Day($MyDate)),2);
var text YY = Right(ToText(Year($MyDate)),2);
$YY & $MM & $DD
Here's what I have:
var date MyDate = ToDate([Date Created]);
var text MM = Right("0" & ToText(Month(ToDate([Date Created]))),2);
var text DD = Right("0" & ToText(Day($MyDate)),2);
var text YY = Right(ToText(Year($MyDate)),2);
$YY & $MM & $DD
- BrianCafferelli6 years agoQrew CaptainFun fact: you can use our new PadLeft and PadRight formulas to make sure you have the right number of 0's for your formula. So you could write the formula this way:
var date MyDate = ToDate([Date Created]);
var text MM = PadLeft(ToText(Month(ToDate([Date Created]))),2,"0");
var text DD = PadLeft(ToText(Day($MyDate)),2,"0");
var text YY = PadLeft(ToText(Year($MyDate)),2,"0");
$YY & $MM & $DD
More details in the Formula Functions Reference: https://login.quickbase.com/db/6ewwzuuj?a=dr&rid=191&rl=i7