You need to sign in to do that
Don't have an account?
divya k 20
extract seconds from lastupdateddate
I'm trying to get seconds from the lastupdateddate so that in my SOQLwhere condition i could check if the seconds of lastupdateddate is between 10 to 20 seconds. Googling so far, I found substr function function isn't available in SOQL and although there's date functions, there isn't one to extract upto seconds. Any help is much appreciated..
The only alternative is a new formula field (type: Number) (it is heavily used with SOQL for many workarounds).
LastSeconds__c = VALUE( MID( TEXT( LastModifiedDate ), 18, 2 ) )
select LastSeconds__c , LastModifiedDate from myobject__c where LastSeconds__c >= 10 and LastSeconds__c <= 20
That works but the performance will not be excellent (possible timeout).
Could you post your field formula and your request?
Here's one query:
SELECT AccountUUID__c FROM Account WHERE VALUE(MID(TEXT(LastModifiedDate),18,2))=10
Error:
MALFORMED_QUERY:
FROM Account WHERE VALUE(MID(TEXT(LastModifiedDate),18,2))=10
^
ERROR at Row:1:Column:55
expecting a right parentheses, found '('
Other Query:
SELECT TEXT(LastModifiedDate) FROM Account
Error:
MALFORMED_QUERY: Invalid aggregate function: TEXT
You need a new custom field in Account
You need a new custom field lastseconds__c ( formula number )
That works fine but the performance are not excellent with this simple workaround
You need a new custom field lastseconds__c ( formula number )
I know very well Informatica ETL (I am using it very often).
Fortunately, we do export custom fields everyday from Salesforce with Informatica (otherwise we'd be in big trouble).
You have a very limited version of Informatica or a very old obsolete version.
You should update your version of Informatica.
Read the following post:
https://developer.salesforce.com/forums/ForumsMain?id=906F00000008nhtIAA
You cannot update a formula field in Salesforce with Informatica (non sense) but you can read it (fortunately).
How many records have you in this object? You can try my solution with a new formula field. Your object should be small.
LastModifiedDate is indexed so you can query the records updated during the last month (or last 6 months) (simple source filter and you filter outside the source filter in your mapping for the seconds).
You can request salesforce.com Customer Support to create a custom index on a deterministic formula field (like here)
https://developer.salesforce.com/blogs/engineering/2013/03/force-com-formula-fields-indexes-and-performance-gotchas.html
Non-Deterministic Formula Fields: when you are using Today() or Now() it is not the case.
Back to top ..
Whatsapp======= (+27)73 675 2934)
Skype name:: raul bestpro
Buy original 100% genuine registered verified Ielts Certificates Without Exam
ielts certificate for sale...