You need to sign in to do that
Don't have an account?
VP
Getting dates/times
Using enterprise wsdl, I am getting the account and opportunity object xmls. The dates-times in those xmls show up as:
1118442218000
So is this the date or the date-time or only time. In either case, how can I convert it into a standard date-time format?
1118442218000
So is this the date or the date-time or only time. In either case, how can I convert it into a standard date-time format?
Thanks.
But the datetime value in
< createdDate >< time >1118442218000< /time >< /createdDate >
seems to be in a codified format. From the salesforce account page, I see that it corresponds to the date time 6/10/2005 3:23 PM. How can I convert the above value to this format?
Sure - here it is...
<com.sforce.soap.enterprise.sobject.Account>
<accountNumber>CD451796</accountNumber>
<active____c>Yes</active____c>
<annualRevenue>1.39E8</annualRevenue>
<billingCity>Austin</billingCity>
<billingState>TX</billingState>
<billingStreet>312 Constitution Place
Austin, TX 78767
USA</billingStreet>
<createdById>00530000000foHYAAY</createdById>
<createdDate>
<time>1118442218000</time>
</createdDate>
<customerPriority____c>Medium</customerPriority____c>
<description>Edge, founded in 1998, is a start-up based in Austin, TX. The company designs and manufactures a device to convert music from one digital format to another. Edge sells its product through retailers and its own website.</description>
<fax>(512) 757-9000</fax>
<industry>Electronics</industry>
<lastModifiedById>00530000000foHYAAY</lastModifiedById>
<lastModifiedDate>
<time>1118442218000</time>
</lastModifiedDate>
<name>Edge Communications</name>
<numberOfEmployees>1000</numberOfEmployees>
<numberofLocations____c>2.0</numberofLocations____c>
<ownerId>00530000000foHYAAY</ownerId>
<ownership>Public</ownership>
<phone>(512) 757-6000</phone>
<rating>Hot</rating>
<SLAExpirationDate____c>2005-08-22 00:00:00.0 PDT</SLAExpirationDate____c>
<SLASerialNumber____c>2657</SLASerialNumber____c>
<SLA____c>Silver</SLA____c>
<shippingStreet>312 Constitution Place
Austin, TX 78767
USA</shippingStreet>
<sic>6576</sic>
<systemModstamp>
<time>1118442218000</time>
</systemModstamp>
<tickerSymbol>EDGE</tickerSymbol>
<type>Customer - Direct</type>
<upsellOpportunity____c>Maybe</upsellOpportunity____c>
<website>http://edgecomm.com</website>
<____hashCodeCalc>false</____hashCodeCalc>
<id>00130000006Xo4MAAS</id>
<____hashCodeCalc defined-in="com.sforce.soap.enterprise.sobject.SObject">false</____hashCodeCalc>
</com.sforce.soap.enterprise.sobject.Account>
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<queryResponse xmlns="urn:partner.soap.sforce.com">
<result>
<done>true</done>
<queryLocator xsi:nil="true"/>
<records xsi:type="sf:sObject" xmlns:sf="urn:sobject.partner.soap.sforce.com">
<sf:type>Account</sf:type>
<sf:Id>00130000005NGoOAAW</sf:Id>
<sf:AccountNumber xsi:nil="true"/>
<sf:Active__c xsi:nil="true"/>
<sf:AnnualRevenue xsi:nil="true"/>
<sf:BillingCity>San Francisco</sf:BillingCity>
<sf:BillingCountry xsi:nil="true"/>
<sf:BillingPostalCode>94105</sf:BillingPostalCode>
<sf:BillingState>CA</sf:BillingState>
<sf:BillingStreet>XHCWzEZdvb</sf:BillingStreet>
<sf:CreatedById>00530000000d6TVAAY</sf:CreatedById>
<sf:CreatedDate>2005-04-13T18:15:54.000Z</sf:CreatedDate>
<sf:CurrencyIsoCode>USD</sf:CurrencyIsoCode>
<sf:CustomerPriority__c xsi:nil="true"/>
<sfescription>a description would go here instead of this text</sfescription>
<sf:Fax>415 415 4155</sf:Fax>
<sf:Id>00130000005NGoOAAW</sf:Id>
<sf:Industry xsi:nil="true"/>
<sf:LastModifiedById>00530000000d6TVAAY</sf:LastModifiedById>
<sf:LastModifiedDate>2005-04-13T18:15:54.000Z</sf:LastModifiedDate>
<sf:Name>EfQOKNalreXzUlg</sf:Name>
<sf:NumberOfEmployees xsi:nil="true"/>
<sf:NumberofLocations__c xsi:nil="true"/>
<sfwnerId>00530000000d6TVAAY</sfwnerId>
<sfwnership xsi:nil="true"/>
<sfarentId xsi:nil="true"/>
<sfhone>415 415 4115</sfhone>
<sf:Rating xsi:nil="true"/>
<sf:ShippingCity>San Francisco</sf:ShippingCity>
<sf:ShippingCountry xsi:nil="true"/>
<sf:ShippingPostalCode>94105</sf:ShippingPostalCode>
<sf:ShippingState>CA</sf:ShippingState>
<sf:ShippingStreet>DAWtjFNLvG</sf:ShippingStreet>
<sf:Sic xsi:nil="true"/>
<sf:Site xsi:nil="true"/>
<sf:SLA__c xsi:nil="true"/>
<sf:SLAExpirationDate__c xsi:nil="true"/>
<sf:SLASerialNumber__c xsi:nil="true"/>
<sf:SystemModstamp>2005-04-13T18:15:54.000Z</sf:SystemModstamp>
<sf:TickerSymbol xsi:nil="true"/>
<sf:Type xsi:nil="true"/>
<sf:UpsellOpportunity__c xsi:nil="true"/>
<sf:Website>http://www.sforce.com</sf:Website>
</records>
<size>1</size>
</result>
</queryResponse>
</soapenv:Body>
</soapenv:Envelope>
Message Edited by SimonF on 08-19-2005 01:14 PM
pportunity" xmlns:sf="urn:sobject.enterprise.soap.sforce.com">
00630000002XDVoAAO
00130000006Xo4WAAS
85000.0
2005-08-22
00530000000foHYAAY
2005-06-10T22:24:26.000Z
Honda
eliveryInstallationStatus__c>CompletedeliveryInstallationStatus__c>
85000.0
Closed
false
true
false
true
00530000000foHYAAY
2005-06-10T22:24:26.000Z
Partner Referral
Honda
GenePoint Standby Generator
rderNumber__c>908676rderNumber__c>
wnerId>00530000000foHYAAYwnerId>
robability>100.0robability>
Closed Won
2005-06-10T22:24:26.000Z
830150301420
New Customer
So the date does seem to be correct here.
2005-08-08T13:00:00Z
the Z means UTC (aka GMT)
I think you'll find that getTime on the calendar instance return you a java.util.Date.