Forum
Keyword
× 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
  • Sayavong's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 6
  • Thank you received: 0

Sayavong created the topic: How to use FUNCTION ? For Return First day of month

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
#21697

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

  • VK
  • VK's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • R13|TAFC|jBASE|windoze
  • Posts: 541
  • Karma: 9
  • Thank you received: 78

VK replied the topic: How to use FUNCTION ? For Return First day of month

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
#21699
The following user(s) said Thank You: Sayavong

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

Time to create page: 0.104 seconds