Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Formula help: next month Post Reply Post New Topic
Author Message
kv41282
Newbie
Newbie


Joined: 06 Mar 2010
Online Status: Offline
Posts: 7
Quote kv41282 Replybullet Topic: Formula help: next month
    Posted: 29 Apr 2018 at 8:48pm
Is there an formula what gives me the first day of the next month after a DB-date?

In the Database is a datefield, i have to count a marge of 30 days with the formula dateadd(d, 30, {db-field})
After this function i need to calculate the next first day of the next month.

For example: DB-field = 24-04-2018
With a marge of 30 days gives me: 24-5-2018
And Now i need als result 1-6-2018.

A other example: DB-field = 05-11-2018
With a marge of 30 days gives me: 05-12-2018
And Now i need als result 1-1-2019.

I’ve tried the function dateserial() , but then i have a problem by passing a new year....
Who van help me?
IP IP Logged
Valert16
Groupie
Groupie
Avatar

Joined: 21 Mar 2016
Location: Spain
Online Status: Offline
Posts: 57
Quote Valert16 Replybullet Posted: 29 Apr 2018 at 10:34pm
Try this:
DateSerial(Year({db-field}), Month({db-field}) + 1, 1)
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.