what are you trying to do?
get the right date?
add a zero? it looks like your trying just to add a leading zero to your dates that are less than 1
post sample workbook
The start date formula is getting the first date of the month and year from a given date so for example if the given date is 12/08/2018 the formula will retuen 01/08/2018
DATETRUNC('month', [Given Date])
What do you want to achieve with formula 2? It appears it is calculating datediff in months with various logic. I believe the code below should work.
IF DATEDIFF('month', [Date 1], [Date 2]) < 1 THEN 1
ELSE DATEDIFF('month', [Date 1], DATEADD('day', 15, [Date 2])) END
I noticed that the cells have been locked using $ sign. So, you may use FIXED LOD expression to calculate [Given Date], [Date 1] and [Date 2]. I can't do this without seeing your data.
Hope this helps.