Skip to main content
Navigator | Tier 3
February 21, 2023
Question

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

  • February 21, 2023
  • 7 replies
  • 1791 views

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

 

Thanks

7 replies

Navigator | Tier 3
February 21, 2023

@Raj 2199. Could always use Excel formulas.

Row 2 = formatted as short date.

A2 | =TODAY()

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

C2 | =EOMONTH(A2,0)

Raul Jaimes
Navigator | Tier 3
February 21, 2023

@Raj 2199 

Also you can create a csv with predefined dates.

 

 

 

Regards

Lisa Wingebach
Navigator | Tier 3
February 21, 2023

Hi @Raj 2199,

You could do something like this…

 



 

Regards,
Lisa

Cadet | Tier 2
February 12, 2024

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

Lisa Wingebach
Navigator | Tier 3
February 13, 2024

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?

Cadet | Tier 2
June 27, 2024

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

 

Cadet | Tier 2
September 16, 2024

You need to choose custom format while assigning.