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

How to use FUNCTION ? For Return First day of month

  • Sayavong
  • Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 3 months ago - 7 years 3 months ago #21697 by Sayavong
Dear All

Help me please.. I would like Return First day of month

How to use routine or function for return First day of month ?

Ex input 20180412 output 20180401 -1 day = 20180331

Thank
Last edit: 7 years 3 months ago by Sayavong.

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

  • VK
  • VK's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Globus:G9-G13|TAFC:R05-R23|TAFJ:R19,R23,R24:test
More
7 years 3 months ago #21699 by VK
Hi
in your example there's the last day of previous month, not what the subj says... Anyway, construct the first day of the month replacing the day ('12' in your example) to "01", then use ICONV() to get internal (integer) date value, then subtract it by 1, then use OCONV() with "DG" option to get the date in the form YYYYMMDD.

Cheers
VK
The following user(s) said Thank You: Sayavong

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

Time to create page: 0.032 seconds