FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How to use HB_DateTimeToSeconds() function?
Posts: 866
Joined: Tue Oct 16, 2007 08:57 AM
How to use HB_DateTimeToSeconds() function?
Posted: Tue Apr 08, 2025 07:19 AM
Dear Antonio,
I use this HB_DateTimeToSeconds() function and get error below:

Compiling...
Harbour 3.2.0dev (r2404101339)
Copyright (c) 1999-2021, https://harbour.github.io/
Compiling 'testfV.prg' and generating preprocessed output to 'testfV.ppo'...
Lines 5063, Functions/Procedures 2
Generating C source output to 'testfV.c'... Done.
Embarcadero C++ 7.70 for Win32 Copyright (c) 1993-2023 Embarcadero Technologies, Inc.
testfV.c:
Turbo Incremental Link 6.97 Copyright (c) 1997-2022 Embarcadero Technologies, Inc.
Error: Unresolved external '_HB_FUN_HB_DATETIMETOSECONDS' referenced from D:\FWH2402\SAMPLES\TESTFV.OBJ
Error: Unable to perform link
* Linking errors *
Best Regards,



Richard



Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 32bit

MySQL v8.0

Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 64bit
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: How to use HB_DateTimeToSeconds() function?
Posted: Tue Apr 08, 2025 08:07 AM

There is no such a function in the whole Harbour and xHarbour repository. Please check the function name.

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: How to use HB_DateTimeToSeconds() function?
Posted: Tue Apr 08, 2025 08:16 AM

Dear Richard,

Please copy testfv.prg source code here, thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 99
Joined: Thu Jul 12, 2007 02:02 PM
Re: How to use HB_DateTimeToSeconds() function?
Posted: Tue Apr 08, 2025 09:48 AM
Hi Richard,

Could this feature be useful to you?
SecondsFrom1970()

#pragma BEGINDUMP

#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include "hbapi.h"

HB_FUNC( SECONDSFROM1970 )

{
        unsigned long count;
        time_t *tmppointer=NULL;
        
        count = time( tmppointer ) ;
        
        hb_retnl( count ) ;
}

#pragma ENDDUMP
Massimo

Continue the discussion