Question

Need to print 1st date and last date of current month, any idea?

  • 21 February 2023
  • 6 replies
  • 1097 views

Badge +5

I need to print 1st date and last date of current month without any scripting language, please help me with this.

 

Thanks


6 replies

Userlevel 1
Badge +4

@Raj 2199. Could always use Excel formulas.

Row 2 = formatted as short date.

A2 | =TODAY()

B2 | =EOMONTH(A2,-1)+1

C2 | =EOMONTH(A2,0)

Userlevel 5
Badge +9

@Raj 2199 

Also you can create a csv with predefined dates.

 

 

 

Regards

Userlevel 2
Badge +4

Hi @Raj 2199,

You could do something like this…

 



 

Regards,
Lisa

Badge

Hi @Raj 2199,

You could do something like this…

 



 

Regards,
Lisa

Hey Lisa, I tried the same but for some reason the subtract datetime does not work properly. When I subtract 1 day from FirstDayOfNextMonth it is showing 02-60-2024 and not 02-29-2024. I am using the Community version

Userlevel 2
Badge +4

Hi @Sowndharya Subramanian,

For the Custom format, are you using MM for the month, or mm?  It should be MM. 

mm would be used to get minutes (time), which is possibly why you’re getting the number 60? 

Can you provide a screenshot of your code?

Badge

Hi @Raj 2199,

You could do something like this…

 



 

Regards,
Lisa

Hi Lisa, When tried to assign to datetime format it is assigning value as 2009-06-15T13:45:30 -> 6/15/2009 1:45:30 PM format and not the mentioned mm/dd/yyyy format. Could you explain line 3 in detail

 

Reply