• Hemanth.ax1701
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 5
    Replies

Hi,

 

I have a created  a XML String using XMLStreamWriter.

 

 XmlStreamWriter w = new XmlStreamWriter();

 

I am able  display this  String using <apex:OutputText> and that looks fine and well structured. My requirement is to write this XML String to a file and save it in SFDC, so that user can quickly download as XML. Please guide me how do I achieve it. Please treat this as very urgent.

 

 

--

Hemanth

Hi,

 

I have a History Object with createdDate as DateTime data type which is in this format 2005-10-08T01:02:03Z

Now my requirement is that i need to get the current time with date in the format 2005-10-08T01:02:03Z and pass it on to the SOQL.

 

I have tried to dynamically get the current DataTime as shown below

 String str = DateTime.now().format('yyyy-MM-dd\'T\'hh:mm:ss\'z\'');

 

but the problem is that i cannot assign this string to my created datatime as shown below

SELECT Id
FROM Account
WHERE CreatedDate =: str

 

I have tried to print DateTime.now(), System.now() in the console but they all throw the output in this fashion - YYYY:MM:DD HH:mm::SS. 

 

Can i please know how do i resolve this or is there any function which can directly fetch me datetime in this format 2005-10-08T01:02:03Z.

 

Appretiate your help.

 

Thanks,

Hemanth

Hi,

 

I have a created  a XML String using XMLStreamWriter.

 

 XmlStreamWriter w = new XmlStreamWriter();

 

I am able  display this  String using <apex:OutputText> and that looks fine and well structured. My requirement is to write this XML String to a file and save it in SFDC, so that user can quickly download as XML. Please guide me how do I achieve it. Please treat this as very urgent.

 

 

--

Hemanth

Hi,

 

I have a History Object with createdDate as DateTime data type which is in this format 2005-10-08T01:02:03Z

Now my requirement is that i need to get the current time with date in the format 2005-10-08T01:02:03Z and pass it on to the SOQL.

 

I have tried to dynamically get the current DataTime as shown below

 String str = DateTime.now().format('yyyy-MM-dd\'T\'hh:mm:ss\'z\'');

 

but the problem is that i cannot assign this string to my created datatime as shown below

SELECT Id
FROM Account
WHERE CreatedDate =: str

 

I have tried to print DateTime.now(), System.now() in the console but they all throw the output in this fashion - YYYY:MM:DD HH:mm::SS. 

 

Can i please know how do i resolve this or is there any function which can directly fetch me datetime in this format 2005-10-08T01:02:03Z.

 

Appretiate your help.

 

Thanks,

Hemanth