Search found 112 matches: unix

Return to advanced search

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: 571

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
? 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: 571

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: 571

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: 571

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: 571

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: 571

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: 571

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: 571

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: 684

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: 684

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: 169

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: 169

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: 169

Re: UNIX time /POSIX

Estoy apenas entrando en el mundo Harbour y FiveWin, por motivos de modificar el software que la empresa tiene. Y en otras partes uso UNIXTIME por lo que me toco realizar este código ya que no conseguí en linea otra forma: Function getUnix2(dDate,tTime)  Local nYearI  := hb_ctot("19...
by MaxSaeta
Sat Oct 29, 2022 6:58 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: UNIX time /POSIX
Replies: 2
Views: 508
Next

Return to advanced search