Android Question DateTime.Now

sivakrith

Member
Licensed User
Longtime User
Hello,

For replication between android device (db) and Server (db) I plan to use DateTime.Now as a key field. ie to retrieve data updated after the last update, I feel DateTime.Now is good candidate.
But this mobile application is only an extension to an already available windows application, where other activities are carried out. [ Windows application is already developed in Powerbuilder and there is no chance to re-develop the entire application in B4X languages anytime soon]. So I need an equivalent function in Powerbuilder [ or need to develop one ] to use this facility.

Is there any way to develop this function in Powerbuilder ? The logic that's used to arrive the value will be useful in developing the same in Powerbuilder.

Any idea ?

Happiness Always
BKR Sivaprakash
 

emexes

Expert
Licensed User
Is there any way to develop this function in Powerbuilder ? The logic that's used to arrive the value will be useful in developing the same in Powerbuilder.
I know little about PowerBuilder, but it sounds like you need to calculate the number of seconds between the current PowerBuilder time and the B4X/Java epoch time of 1970-01-01 00:00, and multiply it by 1000 to make it milliseconds, per B4X/Java date-time type.

In fact, this function might do most of it for you:

http://infocenter.sybase.com/help/i...center.dc38151.1520/html/iqrefbb/Datediff.htm

if you use Millisecond for date-part.
 
Upvote 0
Top