Search found 113 matches: unix

Return to advanced search

Re: insert text into file text

Dear Enrico, HB_MEMOREAD() vs MEMOREAD(): HB_MEMOREAD() is identical to MEMOREAD() except it won’t truncate the last byte (on non-UNIX compatible systems) if it’s a EOF char. static HB_BOOL hb_memowrit( HB_BOOL bHandleEOF ){   const char * pszFileName = hb_parc( ...
by Antonio Linares
Mon Jul 01, 2024 8:16 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: insert text into file text
Replies: 9
Views: 650

Re: How to convert a Date to an Unix TimeStamp?

Thank you, now it's working perfectly :)
by vilian
Mon Jan 29, 2024 2:53 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: How to convert a Date to an Unix TimeStamp?
Replies: 8
Views: 880

Re: How to convert a Date to an Unix TimeStamp?

Both are same.
In that website there is an implicit conversion from your time zone to UTC.
Try this code:
Code: Select all  Expand view  RUN
? FW_DateToUnix( UTC_TIMESTAMP() )

Note: UTC_TIMESTAMP() is an FWH function
by nageswaragunupudi
Mon Jan 29, 2024 2:43 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: How to convert a Date to an Unix TimeStamp?
Replies: 8
Views: 880

Re: How to convert a Date to an Unix TimeStamp?

Thank you Mr Rao, If I try with your function, I'm having this result: 168486480000 for 2023-05-23T18:00:00 SET DATE BRITmyDate := Hb_Dtot(Ctod("23/05/2023"),"18:00:00")? FW_DateToUnix( MyDate ) //168486480000  But in https://www.timestamp-converte...
by vilian
Mon Jan 29, 2024 2:08 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: How to convert a Date to an Unix TimeStamp?
Replies: 8
Views: 880

Re: How to convert a Date to an Unix TimeStamp?

Hi Guys, How could I convert a date/time to an Unix TimeStamp? If you want to use this functionality with MySql, you can use the MySql built-in functions UNIX_TIMESTAMP( <datetime> ) FROM_UNIXTIM( nUnixTime ) Please note that ...
by nageswaragunupudi
Mon Jan 29, 2024 1:42 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: How to convert a Date to an Unix TimeStamp?
Replies: 8
Views: 880

Re: How to convert a Date to an Unix TimeStamp?

* New functions: (valtostr.prg) FW_DateToUnix( dDate/tDateTime ) --> nUnixTimeStamp in MilliSeconds FW_UnixToDate( nUnixTimeStamp(inMilliSeconds) ) --> tDateTime #ifdef __XHARBOUR__   #xtranslate HB_STOT( <c> ) => STOT( ...
by nageswaragunupudi
Mon Jan 29, 2024 1:37 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: How to convert a Date to an Unix TimeStamp?
Replies: 8
Views: 880

Re: How to convert a Date to an Unix TimeStamp?

We have already implemented those functions for FWH already

Please lets wait for Mr. Rao comments about them
by Antonio Linares
Mon Jan 29, 2024 1:26 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: How to convert a Date to an Unix TimeStamp?
Replies: 8
Views: 880

Re: How to convert a Date to an Unix TimeStamp?

Ruth,
I tried it, but didn´t work here. IF you compare the result with that generated from https://www.timestamp-converter.com/, they aren´t the same.
by vilian
Mon Jan 29, 2024 1:19 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: How to convert a Date to an Unix TimeStamp?
Replies: 8
Views: 880

How to convert a Date to an Unix TimeStamp?

Hi Guys,

How could I convert a date/time to an Unix TimeStamp?
by vilian
Mon Jan 29, 2024 12:22 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: How to convert a Date to an Unix TimeStamp?
Replies: 8
Views: 880

Re: DateTime calculation

... seems fine :-) (not exactly correct, but the explanation seems fine) Yes, it looks like the timestamp you provided is in milliseconds since the Unix epoch. To convert a Harbour date variable into a Unix timestamp expressed in milliseconds, you need to follow these steps: Get the date value from ...
by Antonio Linares
Sat Jan 27, 2024 7:57 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: DateTime calculation
Replies: 6
Views: 954

Re: DateTime calculation

... would also like to kindly ask assistance with date and time handling. specifically: is it possible to convert a harbour date variable into a "unix timestamp expressed in milliseconds" (hope this is the correct term)? I am working on a project where I need to pass arrival and departure ...
by Ruth
Sat Jan 27, 2024 7:51 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: DateTime calculation
Replies: 6
Views: 954

Re: UNIX to date

Once we know that 1970-01-01 is the epoch date in Unix, it is very easy to write the conversion: function UnixToDateTime( nUnixDate )return HB_STOT( "19700101000000" ) + ( nUnixDate / 24.0 / 3600.0 ) This returns ...
by Silvio.Falconi
Fri May 12, 2023 7:47 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: UNIX to date
Replies: 2
Views: 233

Re: UNIX to date

Once we know that 1970-01-01 is the epoch date in Unix, it is very easy to write the conversion: function UnixToDateTime( nUnixDate )return HB_STOT( "19700101000000" ) + ( nUnixDate / 24.0 / 3600.0 ) This returns ...
by nageswaragunupudi
Fri May 12, 2023 5:22 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: UNIX to date
Replies: 2
Views: 233

UNIX to date

... converte a number -> time_next_update_unix https://i.postimg.cc/gkMnfYQt/tt.png I found this function but not run ok FUNCTION UnixToDate(nUnix)   LOCAL nSecs, dDate, cTime, dDateTime       nSecs := nUnix - 28800 // correzione fuso orario   dDate := CTOD("01/01/1970")  ...
by Silvio.Falconi
Thu May 11, 2023 10:30 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: UNIX to date
Replies: 2
Views: 233
Next

Return to advanced search