The Opportunity Date fild is likely already a Date type field. So there is not need to convert it to a Date.
Original Message:
Sent: 03-24-2022 06:56
From: Raymond Marlon Tiangco
Subject: Log Number
Hi @Mark Shnier
It worked. Thanks for your help.
Just a follow-up question, if I use the same formula you provided to a different field type for example a Date Type only (ex. Opportunity Date)
var date MyDate = ToDate([Opportunity Date]);
var text YY = Right(ToText(Year($MYDate)), 2);
var text MM = PadLeft(ToText(Month($MyDate)),2, "0");
List("", $YY, $MM, ToText([Record ID#]))
How come I'm getting a another formula error?
May you please advise what should be the new formula?
------------------------------
Raymond Marlon Tiangco
Original Message:
Sent: 03-23-2022 13:06
From: Mark Shnier (YQC)
Subject: Log Number
sorry for the hassler, I tested this.
var date MyDate = ToDate([Quote Date & Time Processed]);
var text YY = Right(ToText(Year($MYDate)), 2);
var text MM = PadLeft(ToText(Month($MyDate)),2, "0");
List("", $YY, $MM, ToText([Record ID#]))
------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
Original Message:
Sent: 03-23-2022 11:57
From: Raymond Marlon Tiangco
Subject: Log Number
Hi @Mark Shnier
Here is the code for the Text Formula field.
var text MyDate = ToDate([Quote Date & Time Processed]);
var text YY = Right(ToText(Year([Date Field])), 2);
var text MM = PadLeft(ToText(Month($MyDate)),2, "0");
List("", $YY, $MM, ToText([Record ID#]))
------------------------------
Raymond Marlon Tiangco
Original Message:
Sent: 03-23-2022 11:22
From: Mark Shnier (YQC)
Subject: Log Number
Please copy and paste the code as I cannot edit a screen shot.
------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
Original Message:
Sent: 03-23-2022 11:14
From: Raymond Marlon Tiangco
Subject: Log Number
Hi @Mark Shnier
There is still Syntax Error after I end it with a semicolon.
Will you be able to find what is wrong with the formula?
Thanks in advance.
------------------------------
Raymond Marlon Tiangco
Original Message:
Sent: 03-23-2022 09:14
From: Mark Shnier (YQC)
Subject: Log Number
This line here needs to end with a semicolon.
var text YY = Right(ToText(Year([Quote Date & Time Processed])), 2);
------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
Original Message:
Sent: 03-23-2022 08:48
From: Raymond Marlon Tiangco
Subject: Log Number
Hi @Mark Shnier
I tried the changes you mentioned, but I'm still getting Syntax Error message
var text MyDate = ToDate([Quote Date & Time Processed]);
var text YY = Right(ToText(Year([Quote Date & Time Processed])), 2)
var text MM = PadLeft(ToText(Month($My Date)),2, "0");
List("", $YY, $MM, ToText([Record ID#]))
Kindly advise.
------------------------------
Raymond Marlon Tiangco
Original Message:
Sent: 03-22-2022 14:01
From: Mark Shnier (YQC)
Subject: Log Number
@Raymond Marlon Tiangco
Try this
Right(ToText(Year([Date Field])), 2)
------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
Original Message:
Sent: 02-08-2022 10:47
From: Raymond Marlon Tiangco
Subject: Log Number
Hi @Paul Peterson
Hi I'm getting "Formula error -- Bad or missing arguments in function call" message when I tried to use this formula
ToText(Right(Year([Date Field]), 2))
in the "Year Date" Formula text field.
Is there another way? Please advise.
------------------------------
Raymond Marlon Tiangco
Original Message:
Sent: 12-17-2021 12:47
From: Paul Peterson
Subject: Log Number
You could create two fields to extract the year and month similar to:
Formula Text fields:
Year Date:
ToText(Right(Year([Date Field]), 2))
Month Date:
PadLeft(ToText(Month([Date Field])), 2, "0")
then in your log field:
var text formulaQuery = "{FID1.EX.'" & [Year Date] & "'} AND {FID2.EX.'" & [Month Date] & "'} AND {3.LTE.'" & [Record ID#] & "'}";
[Year Date] & [Month Date] & PadLeft(ToText(Size(GetRecords($formulaquery))), 5, "0")
where FID1 is the field ID of the year date field and FID2 is the field ID for the month date field
------------------------------
Paul Peterson
Original Message:
Sent: 12-17-2021 10:51
From: Raymond Marlon Tiangco
Subject: Log Number
Hi,
May someone help me create a formula for a Rich Text (Formula) field to be able to create a log number based on a Date / Time field.
Example:
Date / Time = 12-17-2021 1:33 PM
I want may Rich Text (Formula) field to to show 2112001
Where 21 = year, 12 = month, 001 is login number
Please advise. Thank you in advance.
------------------------------
Raymond Marlon Tiangco
------------------------------