How to user GET Control for Partial Date ?

How to user GET Control for Partial Date ?

Postby shri_fwh » Tue Aug 20, 2019 11:15 am

Dear All

I have requirement where user enters only Month and Year in the ( [mm/yyyy]) format but the entered value should be considered as date either begin month ( 01/01/2019 [dd/mm/yyyy] ) or end of the month ( 31/01/2019 [dd/mm/yyyy] )

How we should achieve this ? Please guide me.

Thanks
Shridhar
Thanks
Shridhar
FWH 19.12, BCC 7 32 bit, MariaDB
shri_fwh
 
Posts: 301
Joined: Mon Dec 07, 2009 2:49 pm

Re: How to user GET Control for Partial Date ?

Postby karinha » Wed Aug 21, 2019 1:02 pm

Sorry, I do not understand.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7835
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: How to user GET Control for Partial Date ?

Postby shri_fwh » Thu Aug 22, 2019 7:20 am

Hi Karinha ,

Simply User enters Month and Year in the GET input box in the format of either one of the valid format e.g. MM/YYYY, MON/YYYY. And the entered value should convert into DATE.

something like e.g.
cVar := "01/2019" to dVar := "01/01/2019"

Thanks
Shridhar
Thanks
Shridhar
FWH 19.12, BCC 7 32 bit, MariaDB
shri_fwh
 
Posts: 301
Joined: Mon Dec 07, 2009 2:49 pm

Re: How to user GET Control for Partial Date ?

Postby RAMESHBABU » Fri Aug 23, 2019 12:14 pm

Dear Shridhar,

You can try like this:
Code: Select all  Expand view  RUN

cVar := "01/2019"
dVar1 := BOM(CTOD("01/"+cVar))
dVar2 := EOM(CTOD("01/"+cVar))
?dVar1, dVar2
 

-Ramesh Babu P
User avatar
RAMESHBABU
 
Posts: 625
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Re: How to user GET Control for Partial Date ?

Postby shri_fwh » Sat Aug 24, 2019 4:42 am

Dear Rameshji ,

Thanks a lot ...! This will work ...!



Thanks
Shridhar
Thanks
Shridhar
FWH 19.12, BCC 7 32 bit, MariaDB
shri_fwh
 
Posts: 301
Joined: Mon Dec 07, 2009 2:49 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 72 guests