Skip to main content
Known Participant
February 28, 2024
Answered

Three letter date in System Variable?

  • February 28, 2024
  • 2 replies
  • 417 views

In FM2022 - I am currently using the following definition in a System Variable:

<$monthname> <$daynum>, <$year>

 

Which displays as: February 28, 2024

 

What I want is: Feb 28, 2024

 

Ideas? 

    This topic has been closed for replies.
    Correct answer Bob_Niland

    What System Variable? And what are you getting instead?

    In FM2020, I just inserted system variable Modification Date (Short) in a Body para,

    edited it to:
    <$shortmonthname> <$daynum>, <$year>
    and got
    Feb 29, 2024

     

    2 replies

    Bob_Niland
    Community Expert
    Community Expert
    March 3, 2024

    re: <$shortmonthname> <$daynum>, <$year>

    Because future searches are apt to stumble across this thread, I might add that a very common misperception with date-oriented Variables is due to the Building Blocks elements only being available for System Variables. That BB menu is not present when creating or editing a user Variable.

    People do try to type/paste them into user Variable definitions, but they just get rendered as plain text.

    The problem is that the System Variables have access to {hidden} operating-system supplied data objects, for which the BBs control the presentation. User Variables are defined only by their Definition dialog field, which is just text, FM special characters, \x or \u codepoints, and any applied Character Format. It might be useful if a Var def could accept expressions, other $Vars, etc., but FM hasn't supported that yet.

    Bob_Niland
    Community Expert
    Community Expert
    February 29, 2024

    <$shortmonthname> ?

    Known Participant
    February 29, 2024

    That's what I thought, as well - doesn't work - 

    Bob_Niland
    Community Expert
    Bob_NilandCommunity ExpertCorrect answer
    Community Expert
    February 29, 2024

    What System Variable? And what are you getting instead?

    In FM2020, I just inserted system variable Modification Date (Short) in a Body para,

    edited it to:
    <$shortmonthname> <$daynum>, <$year>
    and got
    Feb 29, 2024