Skip to main content
Question

Log Number

  • December 17, 2021
  • 0 replies
  • 32 views

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
------------------------------
This topic has been closed for replies.

SSNJeffP
Forum|alt.badge.img+11
  • Registered
  • December 20, 2021

Where are you getting the login number from?   

Here is a formula that gets you most of the way there, but I'm not sure where you're getting the login number, so for now I just put "001" in the formula:

var text MonthNumber=Left(ToText([DateTime]),2);
var text YearNumber=Mid(ToText([DateTime]),9,2);
var text LogNumber="001"; //Need to fix this

$YearNumber&$MonthNumber&$LogNumber


If the DateTime field is 09-27-2021 01:49 PM, then it will output 2109001

If you can share where the login number comes from I can help you get that working in there dynamically.



------------------------------
Jeff Peterson
------------------------------