× 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...

Any built-in function to know a date as Holiday

  • gm.saran
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
10 years 3 days ago #15926 by gm.saran
Hi,

Is there any built-in routine or function available, which will say if a selected date is working day or a holiday? Like, i want to make a call by passing the date and it should return if it is a working day or a holiday

Thanks

Please Log in or Create an account to join the conversation.

More
10 years 3 days ago #15927 by t24.user
You can use the api AWD as below:

Y.DATE = '20140420'
CALL AWD('',Y.DATE,Y.VAL)
Y.VAL = 'H'

Similarly if the date is given as 20140421 , the variable Y.VAL will result 'W' as working day.
The following user(s) said Thank You: dinobg, gm.saran

Please Log in or Create an account to join the conversation.

  • armin
  • armin's Avatar
  • Offline
  • Elite Member
  • Elite Member
  • “So long - and thanks for all the fish!”
More
10 years 3 days ago #15929 by armin
First parameter is the region to look for in holiday-table, if empty the local region from COMPANY is used.

Response can be H W orN for general error or X for invalid date.

using R11 on Unix
The following user(s) said Thank You: gm.saran

Please Log in or Create an account to join the conversation.

  • gm.saran
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
10 years 3 days ago #15930 by gm.saran
thanks dears!

similar to that, is there any function that takes the date as input and returns the next working day?

Please Log in or Create an account to join the conversation.

  • gm.saran
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
10 years 3 days ago #15931 by gm.saran
got it (from "Subroutine Guide")

CDT
Calculates forward or previous date from a start date using the number of days.
Arguments: (REGION, DATE, DAYS)
Incoming
REGION: Region code
DATE: Start date, YYYYMMDD
DAYS: The number of days forward in the format. + or -, the number of days, working or calendar eg. +99C, -6W, +66W+3C

Returned
DATE: The calculated date
ETEXT: Error message if unsuccessful


Thanks for the tips!

Please Log in or Create an account to join the conversation.

Time to create page: 0.109 seconds