We’re rewarding the question askers & reputations are being recalculated! Read more.
4 added 10 characters in body
source | link

I want to Convert DateTime into Date

I have been trying this out ..below is the code snippet

public void searchSFDC() {
    DateTime lastModDate ;
    for(sObject resultSet : searchResults[0]) { // searching only solutions
        SfResults sf = new SfResults();
        lastModDate=Datetime.valueOf(resultSet.get('LastModifiedDate'));
        sf.lastModifiedDate =   date.newinstance(lastModDate.year(),lastModDate.month(),lastModDate.day());
     }
}
public class SfResults {
        public Date lastModifiedDate {get;set;}     
}

But sf.lastModifiedDate is shown as 2014-04-11 00:00:00 .I do not want the 00:00:00 timestamp .How can we achieve this?

I want to Convert DateTime into Date

I have been trying this out ..below is the code snippet

public void searchSFDC() {
    DateTime lastModDate ;
    for(sObject resultSet : searchResults[0]) { // searching only solutions
        SfResults sf = new SfResults();
        lastModDate=Datetime.valueOf(resultSet.get('LastModifiedDate'));
        sf.lastModifiedDate =   date.newinstance(lastModDate.year(),lastModDate.month(),lastModDate.day());
}
public class SfResults {
        public Date lastModifiedDate {get;set;}     
}

But sf.lastModifiedDate is shown as 2014-04-11 00:00:00 .I do not want the 00:00:00 timestamp .How can we achieve this?

I want to Convert DateTime into Date

I have been trying this out ..below is the code snippet

public void searchSFDC() {
    DateTime lastModDate ;
    for(sObject resultSet : searchResults[0]) { // searching only solutions
        SfResults sf = new SfResults();
        lastModDate=Datetime.valueOf(resultSet.get('LastModifiedDate'));
        sf.lastModifiedDate = date.newinstance(lastModDate.year(),lastModDate.month(),lastModDate.day());
     }
}
public class SfResults {
        public Date lastModifiedDate {get;set;}     
}

But sf.lastModifiedDate is shown as 2014-04-11 00:00:00 .I do not want the 00:00:00 timestamp .How can we achieve this?

3 text formatted and retagged
source | link

I want to Convert DateTime to DateDateTime into Date

I have been trying this out ..below is the code snippet

public void searchSFDC() {
    DateTime lastModDate ;
    for(sObject resultSet : searchResults[0]) { // searching only solutions
        SfResults sf = new SfResults();
        lastModDate=Datetime.valueOf(resultSet.get('LastModifiedDate'));
        sf.lastModifiedDate =   date.newinstance(lastModDate.year(),lastModDate.month(),lastModDate.day());
}
public class SfResults {
        public Date lastModifiedDate {get;set;}     
}

But sf.lastModifiedDatesf.lastModifiedDate is shown as 2014-04-11 00:00:002014-04-11 00:00:00 .I do not want the 00:00:00 timestamp .How can we achieve this?

I want to Convert DateTime to Date

I have been trying this out ..below is the code snippet

public void searchSFDC() {
    DateTime lastModDate ;
    for(sObject resultSet : searchResults[0]) { // searching only solutions
        SfResults sf = new SfResults();
        lastModDate=Datetime.valueOf(resultSet.get('LastModifiedDate'));
        sf.lastModifiedDate =   date.newinstance(lastModDate.year(),lastModDate.month(),lastModDate.day());
}
public class SfResults {
        public Date lastModifiedDate {get;set;}     
}

But sf.lastModifiedDate is shown as 2014-04-11 00:00:00 .I do not want the 00:00:00 timestamp .How can we achieve this?

I want to Convert DateTime into Date

I have been trying this out ..below is the code snippet

public void searchSFDC() {
    DateTime lastModDate ;
    for(sObject resultSet : searchResults[0]) { // searching only solutions
        SfResults sf = new SfResults();
        lastModDate=Datetime.valueOf(resultSet.get('LastModifiedDate'));
        sf.lastModifiedDate =   date.newinstance(lastModDate.year(),lastModDate.month(),lastModDate.day());
}
public class SfResults {
        public Date lastModifiedDate {get;set;}     
}

But sf.lastModifiedDate is shown as 2014-04-11 00:00:00 .I do not want the 00:00:00 timestamp .How can we achieve this?

2 Code formatted
source | link

I want to Convert DateTime to Date

I have been trying this out ..below is the code snippet public void searchSFDC() { DateTime lastModDate ; for(sObject resultSet : searchResults[0]) { // searching only solutions SfResults sf = new SfResults(); lastModDate=Datetime.valueOf(resultSet.get('LastModifiedDate')); sf.lastModifiedDate = date.newinstance(lastModDate.year(),lastModDate.month(),lastModDate.day()); } public class SfResults { public Date lastModifiedDate {get;set;}
}

public void searchSFDC() {
    DateTime lastModDate ;
    for(sObject resultSet : searchResults[0]) { // searching only solutions
        SfResults sf = new SfResults();
        lastModDate=Datetime.valueOf(resultSet.get('LastModifiedDate'));
        sf.lastModifiedDate =   date.newinstance(lastModDate.year(),lastModDate.month(),lastModDate.day());
}
public class SfResults {
        public Date lastModifiedDate {get;set;}     
}

But sf.lastModifiedDate is shown as 2014-04-11 00:00:00 .I do not want the 00:00:00 timestamp .How can we achieve this?

I want to Convert DateTime to Date

I have been trying this out ..below is the code snippet public void searchSFDC() { DateTime lastModDate ; for(sObject resultSet : searchResults[0]) { // searching only solutions SfResults sf = new SfResults(); lastModDate=Datetime.valueOf(resultSet.get('LastModifiedDate')); sf.lastModifiedDate = date.newinstance(lastModDate.year(),lastModDate.month(),lastModDate.day()); } public class SfResults { public Date lastModifiedDate {get;set;}
}

But sf.lastModifiedDate is shown as 2014-04-11 00:00:00 .I do not want the 00:00:00 timestamp .How can we achieve this?

I want to Convert DateTime to Date

I have been trying this out ..below is the code snippet

public void searchSFDC() {
    DateTime lastModDate ;
    for(sObject resultSet : searchResults[0]) { // searching only solutions
        SfResults sf = new SfResults();
        lastModDate=Datetime.valueOf(resultSet.get('LastModifiedDate'));
        sf.lastModifiedDate =   date.newinstance(lastModDate.year(),lastModDate.month(),lastModDate.day());
}
public class SfResults {
        public Date lastModifiedDate {get;set;}     
}

But sf.lastModifiedDate is shown as 2014-04-11 00:00:00 .I do not want the 00:00:00 timestamp .How can we achieve this?

1
source | link