×
Discuss on Template programming, jBASE programming, Enquiries, No-File enquiry, Enquiry routines, Version, Version routines, Menus, Abbriviations, Creating local reference fields, Fast path enquiries, Creating charts and graphs, Generating Reports, Deal slips, Straight through processing, Multi Company and Multi Book setup, Tabbed screens, Composite Screens, T24 API, etc...
determine last day of the month
- namco
- Topic Author
- Visitor
-
12 years 11 months ago #12388
by namco
determine last day of the month was created by namco
Hi Guys
GLOBUS :G13
Database : Universe
Is there a subroutine that i can call to determine is today is the last working day of the month
GLOBUS :G13
Database : Universe
Is there a subroutine that i can call to determine is today is the last working day of the month
Please Log in or Create an account to join the conversation.
- jpb
-
- Offline
- Moderator
-
- retired . . . ¯\_(ツ)_/¯
Less
More
- Posts: 2859
- Thank you received: 650
12 years 10 months ago #12396
by jpb
Replied by jpb on topic determine last day of the month
With CALCULATE.NEXT.RUN.DATE( LT.RUN.DATE, NT.RUN.DATE, FREQUENCY, COMPANY.ID, RESPONSE ) and setting
LT.RUN.DATE = TODAY
NT.RUN.DATE = ""
FREQUENCY = "M"
COMPANY.ID = "XX0010001"
RESPONSE = ""
you should be able to check for the last workingday of the current month
LT.RUN.DATE = TODAY
NT.RUN.DATE = ""
FREQUENCY = "M"
COMPANY.ID = "XX0010001"
RESPONSE = ""
you should be able to check for the last workingday of the current month
Please Log in or Create an account to join the conversation.
- namco
- Topic Author
- Visitor
-
12 years 10 months ago - 12 years 10 months ago #12399
by namco
Replied by namco on topic determine last day of the month
@jpb what i want to check is TODAY is the last working day of the month
Last edit: 12 years 10 months ago by namco.
Please Log in or Create an account to join the conversation.
- jpb
-
- Offline
- Moderator
-
- retired . . . ¯\_(ツ)_/¯
Less
More
- Posts: 2859
- Thank you received: 650
12 years 10 months ago #12400
by jpb
Replied by jpb on topic determine last day of the month
TODAY.IS.LAST.DAY.OF.MONTH = ""
NT.RUN.DATE = ""
FREQUENCY = "M01"
COMPANY.ID = "XX0010001"
RESPONSE = ""
CALL CALCULATE.NEXT.RUN.DATE( LT.RUN.DATE, NT.RUN.DATE, FREQUENCY, COMPANY.ID, RESPONSE )
IF NT.RUN.DATE = TODAY THEN TODAY.IS.LAST.DAY.OF.MONTH = 1
NT.RUN.DATE = ""
FREQUENCY = "M01"
COMPANY.ID = "XX0010001"
RESPONSE = ""
CALL CALCULATE.NEXT.RUN.DATE( LT.RUN.DATE, NT.RUN.DATE, FREQUENCY, COMPANY.ID, RESPONSE )
IF NT.RUN.DATE = TODAY THEN TODAY.IS.LAST.DAY.OF.MONTH = 1
Please Log in or Create an account to join the conversation.
- baskarjay
-
- Offline
- Senior Member
-
Less
More
- Posts: 51
- Thank you received: 0
6 years 9 months ago #21911
by baskarjay
Replied by baskarjay on topic determine last day of the month
Hi JBP,
I dont know how have this as solution for finding last day of the month ...
do you thought it works ????
I dont know how have this as solution for finding last day of the month ...
do you thought it works ????
Please Log in or Create an account to join the conversation.
- silvergem
-
- Offline
- Elite Member
-
- TAFC|R12/R13, TAFJ|R20
Less
More
- Posts: 270
- Thank you received: 21
6 years 9 months ago #21936
by silvergem
Replied by silvergem on topic determine last day of the month
You can create a routine to check using below steps
Example:
TODAY is Oct 2 2018 and the last day is Oct 31 2018 right?
1. Add +1 on the month and Replace the day with 01 (E.g 20181101)
1.1 Add a condition that when month is 12 (December), replace it with 01 (January)
2. Use CDT Function (E.g CALL CDT('', '20181101', '-1C'))
3. Compare the result on CDT and todays date
Example:
TODAY is Oct 2 2018 and the last day is Oct 31 2018 right?
1. Add +1 on the month and Replace the day with 01 (E.g 20181101)
1.1 Add a condition that when month is 12 (December), replace it with 01 (January)
2. Use CDT Function (E.g CALL CDT('', '20181101', '-1C'))
3. Compare the result on CDT and todays date
The following user(s) said Thank You: baskarjay
Please Log in or Create an account to join the conversation.
Time to create page: 0.036 seconds