FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Problem with datepick - Resolved -
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Problem with datepick - Resolved -
Posted: Tue Mar 26, 2024 12:42 PM
give me an error when I try to select a date


Code (fw): Select all Collapse
 @ nRow, 70 DTPICKER  aGet[1] VAR ddatacambio OF oDlgSub SIZE 198, 25 PIXEL ;
      FONT oFont UPDATE PICTURE "ddd dd mmm yyyy"  ;
     VALID ( DoSwitch( ddatacambio, oBtnGetExchange) ) STYLE DTS_SHOWNONE

 @ nRow-0.2,  320 BTNBMP oBtnGetExchange ;
              PROMPT "Aggiorna on line"  OF oDlgSub;
              SIZE 120, 24 PIXEL FLAT GDIPLUS ;
              BITMAP "BTN_INTERNET"    LEFT NOROUND ;
              ACTION nil

STATIC FUNCTION DoSwitch( ddatacambio, oBtnGetExchange  )
LOCAL dDate := ddatacambio:GetDate()
LOCAL cDate := DTOC(dDate)

   IF EMPTY(cDate)
      oBtnGetExchange:Disable()
   ELSE
      oBtnGetExchange:enable()
   ENDIF
   oBtnGetExchange:Refresh()
RETURN .T.
I must activate a btnbmp if the date is valid

the error
Code (fw): Select all Collapse
   Time from start: 0 hours 0 mins 10 secs 
   Error occurred at: 26-03-2024, 13:35:13
   Error description: Error BASE/1004  Metodo non disponibile: GETDATE
   Args:
     [   1] = D   26-03-2024

Stack Calls
===========
   Called from: source\Pvalute.prg => GETDATE( 0 )
   Called from: source\Pvalute.prg => DOSWITCH( 1134 )
   Called from: source\Pvalute.prg => (b)EDIT_STORICO( 1085 )
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Problem with datepick
Posted: Tue Mar 26, 2024 12:47 PM
Code (fw): Select all Collapse
LOCAL dDate := ddatacambio:GetDate()

Here is the mistake.
"ddatacambio" is a date value and date value can not have any method.
Regards



G. N. Rao.

Hyderabad, India
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Re: Problem with datepick
Posted: Tue Mar 26, 2024 01:07 PM
nageswaragunupudi wrote:
Code (fw): Select all Collapse
LOCAL dDate := ddatacambio:GetDate()

Here is the mistake.
"ddatacambio" is a date value and date value can not have any method.
opps - corrected
STATIC FUNCTION DoSwitch( ddatacambio, oBtnGetExchange,aGet )
LOCAL dDate := aget[1]:GetDate()
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com

Continue the discussion