FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How to user GET Control for Partial Date ?
Posts: 336
Joined: Mon Dec 07, 2009 02:49 PM
How to user GET Control for Partial Date ?
Posted: 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 24.04, BCC 7 32 bit, MariaDB
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: How to user GET Control for Partial Date ?
Posted: Wed Aug 21, 2019 01:02 PM

Sorry, I do not understand.

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 336
Joined: Mon Dec 07, 2009 02:49 PM
Re: How to user GET Control for Partial Date ?
Posted: Thu Aug 22, 2019 07: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 24.04, BCC 7 32 bit, MariaDB
Posts: 654
Joined: Fri Oct 21, 2005 05:54 AM
Re: How to user GET Control for Partial Date ?
Posted: Fri Aug 23, 2019 12:14 PM
Dear Shridhar,

You can try like this:
Code (fw): Select all Collapse
cVar := "01/2019"
dVar1 := BOM(CTOD("01/"+cVar))
dVar2 := EOM(CTOD("01/"+cVar))
?dVar1, dVar2

-Ramesh Babu P
Posts: 336
Joined: Mon Dec 07, 2009 02:49 PM
Re: How to user GET Control for Partial Date ?
Posted: Sat Aug 24, 2019 04:42 AM

Dear Rameshji ,

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

Thanks
Shridhar

Thanks

Shridhar

FWH 24.04, BCC 7 32 bit, MariaDB

Continue the discussion