I hope to select only the year and month here

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lj4353
    Senior Member
    • Nov 2023
    • 134

    I hope to select only the year and month here

    I hope to select only the year and month here, without choosing the day. How can I do this? If this is not possible, please tell me how to write a formula that automatically saves it as the last day of the chosen month.

    Click image for larger version

Name:	image.png
Views:	155
Size:	37.8 KB
ID:	100767
  • abidoss
    Senior Member
    • Mar 2023
    • 233

    #2
    Hello

    PHP Code:


    $j 
    date;


    $day datetime\date($j);
    $dayMonth datetime\month($j);
    $dayYear datetime\year($j);

    $result string\concatenate($dayYear'-'$dayMonth'-'30);



    date $result​ 
    Last edited by abidoss; 12-16-2023, 11:14 PM.

    Comment

    • abidoss
      Senior Member
      • Mar 2023
      • 233

      #3
      You can display only the year and the month in another field, not in the date field itself.

      PHP Code:

      $j 
      date;


      $dayMonth datetime\month($j);
      $dayYear datetime\year($j);

      $result string\concatenate($dayYear'-'$dayMonth);



      fieldExmple $result​  ​ 

      Comment

      Working...