2

It's entirely possible to get the same millisecond for a number of calls, so your plan won't work if they're too close together. I wrote a simple script that was able to get the same millisecond 15-20 times in a row. Also, the logged millisecond does not exactly align to the value returned from DateTime.now(), lagging by about about 0.5 milliseconds in some ...


2

You can do this using the functions DateAdd, DateDiff and a multiplication. The query could look like this: SELECT DateAdd(day, DateDiff(day, movein, moveout)*0.7, movein) as [reminder_date] FROM exampletable For your example this results in the date 2020-01-22. Further resources: DateAdd function reference DateDiff function reference


1

If the comparison is based on GMT why is it returning records in the second case above when set to EST timezone and not when set to GMT timezone? All date literals return values based on the user's current time zone. This ensures that if a user asks for records from "today" or "last_n_days:10", they'll get results that they would expect to get if they were ...


1

Try this. String inpputString = '2020-05-15T08:48:17.000+0000'; DateTime resultDateTime = DateTime.ValueofGmt(inpputString.replace('T', ' ')); System.Debug('resultDateTime>> '+resultDateTime); Output: 16:19:36:002 USER_DEBUG [6]|DEBUG|resultDateTime>> 2020-05-15 08:48:17


Only top voted, non community-wiki answers of a minimum length are eligible