Skip to main content
Question

Converting Date to Text

  • August 18, 2021
  • 0 replies
  • 217 views

Forum|alt.badge.img+2
I'm trying to create a field that combines an employee's alphanumeric id from one field, with the date in another field.  

I can't find a formula that will allow me to link a text field with a date field, but am wondering if I'm able to convert the date to text?

------------------------------
Monica Bridges
------------------------------

MarkShnierYou
Forum|alt.badge.img+24
Yes, you can convert most field to text using the ToText function.

for Example

List(" ", [Employee ID], ToText(My Date Field]))

------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------

MarkShnierYou
Forum|alt.badge.img+24

np,

 

var date MyDate = [Ship Date]; // enter your field here

var text YYYY = ToText(Year($MyDate));

var text MM = PadLeft(ToText(Month($MyDate)), 2, "0");

var text DD = PadLeft(ToText(Day($MyDate)), 2, "0");

List("-", $DD, $MM, $YYYY)