• Mano sfdc
  • NEWBIE
  • 45 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 11
    Questions
  • 16
    Replies
Error: Compile Error: Invalid identifier '    public String getObjType'. Apex identifiers must start with an ASCII letter (a-z or A-Z) followed by any number of ASCII letters (a-z or A-Z), digits (0 - 9), '$', '_'. at line 3 column 1


public class UserRoleHierarchyController
{
    public String getObjType() 
    {
        return String.valueOf(Account.sObjectType);
    }
    
    public UserRoleHelper.RoleNodeWrapper getRootNodeOfTree(Id roleOrUserId) 
    {
        return UserRoleHelper.getRootNodeOfUserTree(roleOrUserId);
    }

    public String getJsonString() 
    {
        String str = null;
        str = UserRoleHelper.getTreeJSON('00E7F000001qt7I');
        return str; 
    }
    
    public String selectedValues {get; set;}
  
}
Hi Experts,

I'm new to test classes and I have created an Apex Class, some one please help me on creating Test Class. Thanks in Advance.



public class TestUserRoleController 
{
    public String getObjType() 
    {
        return String.valueOf(Account.sObjectType);
    }
    
    public UserRoleHelper.RoleNodeWrapper getRootNodeOfTree(Id roleOrUserId) 
    {
        return UserRoleHelper.getRootNodeOfUserTree(roleOrUserId);
    }

    public String getJsonString() 
    {
        String str = null;
        str = UserRoleHelper.getTreeJSON('00E7F000001qt7I');
        return str; 
    }
    
    public String selectedValues {get; set;}
  
}
Hi Experts,

I have created an Apex Class, some one please help me on creating Test Class. Thanks in Advance.



public class UserRoleController {
    
    public Boolean selectable {get; set;}
    
    public String selectNodeKeys {get; set;}

    {
        selectable = false;
        selectNodeKeys = 'No value selected';
    }
    
    public String JsonData {get; set;}
    
    public String roleOrUserId {get; set;}
    
    public String getJsonString() 
    {
        if (JsonData == null){
            JsonData = UserRoleHelper.getTreeJSON(roleOrUserId);
        }
        return JsonData;
    }

}
Hi Experts,

I have created an Apex Class, some one please help me on creating Test Class. Thanks in Advance.

Note: In Same Class (end of the class) I have tried test class, but no luck.



public class UserRoleHelper {

    /********************* Properties used by getRootNodeOfUserTree function - starts **********************/
    // map to hold roles with Id as the key
    private static Map <Id, UserRole> roleUsersMap;

    // map to hold child roles with parentRoleId as the key
    private static Map <Id, List<UserRole>> parentChildRoleMap;

    // List holds all subordinates
    private static List<User> allSubordinates {get; set;}
        
    // Global JSON generator
    private static JSONGenerator gen {get; set;}

    /********************* Properties used by getRootNodeOfUserTree function - ends **********************/
    
    
    /********************* Properties used by getSObjectTypeById function - starts ********************* */
    // map to hold global describe data
    private static Map<String,Schema.SObjectType> gd;
    
    // map to store objects and their prefixes
    private static Map<String, String> keyPrefixMap;

    // to hold set of all sObject prefixes
    private static Set<String> keyPrefixSet;
    /********************* Properties used by getSObjectTypeById function - ends **********************/
    
    /* // initialize helper data */ 
    static {
        // initialize helper data for getSObjectTypeById function
        init1();
        
        // initialize helper data for getRootNodeOfUserTree function
        init2();
    }
    
    /* // init1 starts <to initialise helper data> */
    private static void init1() {
        // get all objects from the org
        gd = Schema.getGlobalDescribe();
        
        // to store objects and their prefixes
        keyPrefixMap = new Map<String, String>{};
        
        //get the object prefix in IDs
        keyPrefixSet = gd.keySet();
        
        // fill up the prefixes map
        for(String sObj : keyPrefixSet) {
            Schema.DescribeSObjectResult r =  gd.get(sObj).getDescribe();
            String tempName = r.getName();
            String tempPrefix = r.getKeyPrefix();
            keyPrefixMap.put(tempPrefix, tempName);
        }
    }
    /* // init1 ends */

    /* // init2 starts <to initialise helper data> */
    private static void init2() {
        
        // Create a blank list
        allSubordinates = new List<User>();
        
        // Get role to users mapping in a map with key as role id
        roleUsersMap = new Map<Id, UserRole>([select Id, Name, parentRoleId, (select id, name from users) from UserRole order by parentRoleId]);
        
        // populate parent role - child roles map
        parentChildRoleMap = new Map <Id, List<UserRole>>();        
        for (UserRole r : roleUsersMap.values()) {
            List<UserRole> tempList;
            if (!parentChildRoleMap.containsKey(r.parentRoleId)){
                tempList = new List<UserRole>();
                tempList.Add(r);
                parentChildRoleMap.put(r.parentRoleId, tempList);
            }
            else {
                tempList = (List<UserRole>)parentChildRoleMap.get(r.parentRoleId);
                tempList.add(r);
                parentChildRoleMap.put(r.parentRoleId, tempList);
            }
        }
    } 
    /* // init2 ends */

    /* // public method to get the starting node of the RoleTree along with user list */
    public static RoleNodeWrapper getRootNodeOfUserTree (Id userOrRoleId) {
        return createNode(userOrRoleId);
    }
    
    /* // createNode starts */
    private static RoleNodeWrapper createNode(Id objId) {
        RoleNodeWrapper n = new RoleNodeWrapper();
        Id roleId;
        if (isRole(objId)) {
            roleId = objId;
            if (!roleUsersMap.get(roleId).Users.isEmpty()) {
                n.myUsers = roleUsersMap.get(roleId).Users;
                allSubordinates.addAll(n.myUsers);
                n.hasUsers = true;
            }
        }
        else {
            List<User> tempUsrList = new List<User>();
            User tempUser = [Select Id, Name, UserRoleId from User where Id =: objId];
            tempUsrList.add(tempUser);
            n.myUsers = tempUsrList;
            roleId = tempUser.UserRoleId;
        }
        n.myRoleId = roleId;
        n.myRoleName = roleUsersMap.get(roleId).Name;
        n.myParentRoleId = roleUsersMap.get(roleId).ParentRoleId;

        if (parentChildRoleMap.containsKey(roleId)){
            n.hasChildren = true;
            n.isLeafNode = false;
            List<RoleNodeWrapper> lst = new List<RoleNodeWrapper>();
            for (UserRole r : parentChildRoleMap.get(roleId)) {
                lst.add(createNode(r.Id));
            }           
            n.myChildNodes = lst;
        }
        else {
            n.isLeafNode = true;
            n.hasChildren = false;
        }
        return n;
    }
    
    public static List<User> getAllSubordinates(Id userId){
        createNode(userId);
        return allSubordinates;
    }
    
    public static String getTreeJSON(Id userOrRoleId) {
        gen = JSON.createGenerator(true);
        RoleNodeWrapper node = createNode(userOrRoleId);
        gen.writeStartArray();
            convertNodeToJSON(node);
        gen.writeEndArray();
        return gen.getAsString();
    }
    
    private static void convertNodeToJSON(RoleNodeWrapper objRNW){
        gen.writeStartObject();
            gen.writeStringField('title', objRNW.myRoleName);
            gen.writeStringField('key', objRNW.myRoleId);
            gen.writeBooleanField('unselectable', false);
            gen.writeBooleanField('expand', true);
            gen.writeBooleanField('isFolder', true);
            if (objRNW.hasUsers || objRNW.hasChildren)
            {
                gen.writeFieldName('children');
                gen.writeStartArray();
                    if (objRNW.hasUsers)
                    {
                        for (User u : objRNW.myUsers)
                        {
                            gen.writeStartObject();
                                gen.writeStringField('title', u.Name);
                                gen.writeStringField('key', u.Id);
                            gen.WriteEndObject();
                        }
                    }
                    if (objRNW.hasChildren)
                    {
                        for (RoleNodeWrapper r : objRNW.myChildNodes)
                        {
                            convertNodeToJSON(r);
                        }
                    }
                gen.writeEndArray();
            }
        gen.writeEndObject();
    }
    
    /* // general utility function to get the SObjectType of the Id passed as the argument, to be used in conjunction with */ 
    public static String getSObjectTypeById(Id objectId) {
        String tPrefix = objectId;
        tPrefix = tPrefix.subString(0,3);
        
        //get the object type now
        String objectType = keyPrefixMap.get(tPrefix);
        return objectType;
    }
    /* // utility function getSObjectTypeById ends */
    
    /* // check the object type of objId using the utility function getSObjectTypeById and return 'true' if it's of Role type */
    public static Boolean isRole (Id objId) {
        if (getSObjectTypeById(objId) == String.valueOf(UserRole.sObjectType)) {
            return true;
        }
        else if (getSObjectTypeById(objId) == String.valueOf(User.sObjectType)) {
            return false;
        } 
        return false;
    }
    /* // isRole ends */
    
    public class RoleNodeWrapper {
    
        // Role info properties - begin
        public String myRoleName {get; set;}
        
        public Id myRoleId {get; set;}
        
        public String myParentRoleId {get; set;}
        // Role info properties - end
        
        
        // Node children identifier properties - begin
        public Boolean hasChildren {get; set;}
        
        public Boolean isLeafNode {get; set;}
        
        public Boolean hasUsers {get; set;}
        // Node children identifier properties - end
        
        
        // Node children properties - begin
        public List<User> myUsers {get; set;}
    
        public List<RoleNodeWrapper> myChildNodes {get; set;}
        // Node children properties - end   
        
        public RoleNodeWrapper(){
            hasUsers = false;
            hasChildren = false;
        }
    }   
    
 }
 



//    @isTest
//    static void testUserRoleHelper() {
        
        /*
        // test the output in system debug with role Id
        Id roleId = '00E90000000pMaP';
        RoleNodeWrapper startNodeWithRoleId = UserRoleHelper.getRootNodeOfUserTree(roleId);
        String strJsonWithRoleId = JSON.serialize(startNodeWithRoleId);
        system.debug(strJsonWithRoleId);
        */
        //system.debug('****************************************************');

        // now test the output in system debug with userId
//        Id userId = UserInfo.getUserId() ;
        /*
        RoleNodeWrapper startNodeWithUserId = UserRoleHelper.getRootNodeOfUserTree(userId);
        String strJsonWithUserId = JSON.serialize(startNodeWithUserId);
        system.debug(strJsonWithUserId);
        */
        
        // test whether all subordinates get added
        //Id userId = '005900000011xZv';
//        String str = UserRoleHelper.getTreeJSON(userId);
        //List<User> tmpUsrList = UserRoleHelper.getAllSubordinates('00E90000000pMaP');
        //system.debug('%%%%%%%%%%%%%%%%%%%%%%%%%%%%%tmpUsrList:' + tmpUsrList);
//   }
Hi Experts,

Please find below Class & Page. It is not showing output values.

Apex Class:

public class RetrieveClassesTriggersInWrapper{

   public List<ApexClass> classNames{set;get;}
   public List<ApexTrigger> triggerNames{set;get;}
   public List<ApexClass> testClassNames{set;get;}
   public List<Apexpage> pageNames{set;get;}
   public List<MyWrapper> wrapper {get; set;}


   public void RetrieveClassesTriggersInWrapper()
   {
     classNames=[SELECT id, name from ApexClass where not(Name like '%test%') ORDER BY Name ASC];
     triggerNames=[SELECT id, name from ApexTrigger ORDER BY Name ASC];
     testClassNames=[SELECT id, name from ApexClass where (Name like '%test%') ORDER BY Name ASC];
     pageNames=[SELECT id, name from Apexpage ORDER BY Name ASC];
     
     wrapper = new List<MyWrapper>() ;
 
     for(Integer i=0 ; i < 10 ; i++)
     wrapper.add(new MyWrapper(classNames[i], triggerNames[i], testClassNames[i], pageNames[i])) ;

   }

   public class MyWrapper
   {
     public ApexClass Classes {get; set;}
     public ApexTrigger Triger {get; set;}
     public ApexClass testClass {get; set;}
     public Apexpage vfPage {get; set;}

       
     public MyWrapper(ApexClass cls, ApexTrigger tri, ApexClass testCls, Apexpage page)
     {
        Classes = cls ;
        Triger = tri ;
        testClass = testCls;
        vfPage = page;
     }
  }
}


VF Page:

<apex:page controller="RetrieveClassesTriggersInWrapper">
  <apex:pageBlock >
   <apex:pageblockSection >
     <apex:pageBlockTable value="{!wrapper}" var="wrap">
       <apex:column headerValue="Classes" value="{!wrap.Classes.Name}"/>
       <apex:column headerValue="Triggers" value="{!wrap.Triger.Name}"/>
       <apex:column headerValue="TestClasses" value="{!wrap.testClass.Name}"/>
       <apex:column headerValue="Visualforce Pages" value="{!wrap.vfPage.Name}"/>
     </apex:pageblockTable>
   </apex:pageblockSection>
  </apex:pageBlock>
</apex:page>

Out put:  Output not showing any values.

Output


Please anyone help me.

Thanks,
Manu
Hi Experts,

I need a Formula help.
I have two date fields(T__c, F__c), I need difference between dates format like X Year(s) X Month(s) X Day(s)

To Date field: T__c
From Date field:  F__c

My formula is below..

IF(AND(Year(T__c)=Year(F__c),Month(T__c)>=Month(F__c),Day(T__c)>=Day(F__c)),TEXT(Month(T__c)-Month(F__c))&" Month(s) "&""&TEXT(Day(T__c)-Day(F__c))&" Day(s) ",
IF(AND(Year(T__c)=Year(F__c),Month(T__c)>Month(F__c),Day(T__c)<Day(F__c)),TEXT((Month(T__c)-Month(F__c))-1)&" Month(s) "&""&TEXT((30+Day(T__c))-Day(F__c))&" Day(s) ",

IF(AND(Year(T__c)>Year(F__c),Month(T__c)=Month(F__c),Day(T__c)=Day(F__c)),TEXT(Year(T__c)-Year(F__c))&" Year(s) ",

IF(AND(Year(T__c)>Year(F__c),Month(T__c)>Month(F__c),Day(T__c)=Day(F__c)),TEXT(Year(T__c)-Year(F__c))&" Year(s) "&""&TEXT(Month(T__c)-Month(F__c))&" Month(s) ",
IF(AND(Year(T__c)>Year(F__c),Month(T__c)>Month(F__c),Day(T__c)>Day(F__c)),TEXT(Year(T__c)-Year(F__c))&" Year(s) "&""&TEXT(Month(T__c)-Month(F__c))&" Month(s) "&""&TEXT(Day(T__c)-Day(F__c))&" Day(s) ",
IF(AND(Year(T__c)>Year(F__c),Month(T__c)>Month(F__c),Day(T__c)<Day(F__c)),TEXT(Year(T__c)-Year(F__c))&" Year(s) "&""&TEXT((Month(T__c)-Month(F__c))-1)&" Month(s) "&""&TEXT((30+Day(T__c))-Day(F__c))&" Day(s) ",

IF(AND(Year(T__c)>Year(F__c),Month(T__c)<Month(F__c),Day(T__c)=Day(F__c)),TEXT((Year(T__c)-Year(F__c))-1)&" Year(s) "&""&TEXT((30+Month(T__c))-Month(F__c))&" Month(s) ",
IF(AND(Year(T__c)>Year(F__c),Month(T__c)<Month(F__c),Day(T__c)>Day(F__c)),TEXT((Year(T__c)-Year(F__c))-1)&" Year(s) "&""&TEXT((12+Month(T__c))-Month(F__c))&" Month(s) "&""&TEXT(Day(T__c)-Day(F__c))&" Day(s) ",
IF(AND(Year(T__c)>Year(F__c),Month(T__c)<Month(F__c),Day(T__c)<Day(F__c)),TEXT((Year(T__c)-Year(F__c))-1)&" Year(s) "&""&TEXT(((12+Month(T__c))-Month(F__c))-1)&" Month(s) "&""&TEXT((30+Day(T__c))-Day(F__c))&" Day(s) ", 
TEXT(0) 
)))))))))

Formula is perfect, but it showing below error.

Error:  Compiled formula is too big to execute (5,153 characters). Maximum size is 5,000 characters.

Anyone can please sort out this.
Thanks in advance.

Thanks,
Manohar
Hi Experts,
 
One custom field named as ERP__c in Account Object.
Initial day’s data entry guy not entering the information about ERP__c field in Account object.
We have an Accounts more than 1,500.
Is there a way in Salesforce to automatically fill the ERP field info for existing account records data?
Anyone help me out.
Thanks in advance.

please find below image.

User-added image
Hi Experts,

In VF Pages code, {!$User.Name} It gives error.
Anyone please help me, how to fetch User object name field value into VF Page code.
Thanks in advance.
Hi All,

I have three fields.

Month__c -> Denotes month value (Ex. Jan, Feb etc)
Year__c -> Denotes Year value (Ex. 2013, 2014 etc)
Bill_Month__c -> Formula field need combination of both Month+Year (Ex. Nov 2013)

Please find below image.

User-added image

Thanks in advance.

Thanks,
Manohar
Hi All,

Page Code:

<apex:page controller="Send_Doc_Controller" >
  <apex:sectionHeader title="Documents" subtitle="Email a Document" 
    description="email existing document to specified email address"/>

  <apex:form >
    <apex:pageMessages />
    <apex:pageBlock title="Document Input">

      <apex:pageBlockButtons >
        <apex:commandButton action="{!sendDoc}" value="Send Document"/>
      </apex:pageBlockButtons>

      <apex:pageBlockSection >

        <apex:pageBlockSectionItem >
            <apex:outputLabel value="Email send to" for="email"/>
          <apex:inputText value="{!email}" id="email"/>
        </apex:pageBlockSectionItem>

<!---        <apex:pageBlockSectionItem >
            <apex:outputLabel value="Document" for="document"/>
            <apex:selectList value="{!documentId}" id="document" size="1">
                 <apex:selectOptions value="{!documents}"/>
            </apex:selectList>
        </apex:pageBlockSectionItem>  --->

      </apex:pageBlockSection>

      <apex:pageBlockSection title="Select Documents" columns="2" >
          <apex:selectCheckboxes layout="pageDirection"  borderVisible="true" value="{!documentId}" id="document" legendInvisible="false"><apex:selectoptions value="{!documents}" /></apex:selectCheckboxes>
      </apex:pageBlockSection>

    </apex:pageBlock>
  </apex:form>
</apex:page>


Class Code:

public with sharing class Send_Doc_Controller {
    // public ID documentId {get;set;}
    Public List<Id> documentId {get;set;}
    public String email {get;set;}
    public string[] s = new string[]{};

      public List<SelectOption> documents {
    get {
            documents = new List<SelectOption>();
            for(Document d : [SELECT id,Name FROM Document ]){
                Documents.add(new SelectOption(d.Id,d.name));
            }
            return documents;
    }
    set;
  }

  public Send_Doc_Controller(){
    documentId = new List<Id>();
  }

  public PageReference sendDoc(){
          Document doc = [select id, name, body, contenttype, developername, type 
      from Document where id IN: documentId];

      system.debug('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'+doc);

    Messaging.EmailFileAttachment attach = new Messaging.EmailFileAttachment();
    attach.setContentType(doc.contentType);
    attach.setFileName(doc.developerName+'.'+doc.type);
    attach.setInline(false);
    attach.Body = doc.Body;

    Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
    mail.setUseSignature(false);

    s = email.split(',');
    system.debug('@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@'+s);
    mail.setToAddresses(s);
    system.debug('%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'+string.valueof(s));
    mail.setSubject('Document Email Demo');
    mail.setHtmlBody('Here is the email you requested: '+doc.name);
    mail.setFileAttachments(new Messaging.EmailFileAttachment[] { attach }); 

    // Send the email
    Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });

    ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.INFO, 'Email with Document sent to '+email));

    return null;
  }
}


Note: in documents, need at least two documents.

 
Hi Experts,

I need a Formula help.
I have two date fields(T__c, F__c), I need difference between dates format like X Year(s) X Month(s) X Day(s)

To Date field: T__c
From Date field:  F__c

My formula is below..

IF(AND(Year(T__c)=Year(F__c),Month(T__c)>=Month(F__c),Day(T__c)>=Day(F__c)),TEXT(Month(T__c)-Month(F__c))&" Month(s) "&""&TEXT(Day(T__c)-Day(F__c))&" Day(s) ",
IF(AND(Year(T__c)=Year(F__c),Month(T__c)>Month(F__c),Day(T__c)<Day(F__c)),TEXT((Month(T__c)-Month(F__c))-1)&" Month(s) "&""&TEXT((30+Day(T__c))-Day(F__c))&" Day(s) ",

IF(AND(Year(T__c)>Year(F__c),Month(T__c)=Month(F__c),Day(T__c)=Day(F__c)),TEXT(Year(T__c)-Year(F__c))&" Year(s) ",

IF(AND(Year(T__c)>Year(F__c),Month(T__c)>Month(F__c),Day(T__c)=Day(F__c)),TEXT(Year(T__c)-Year(F__c))&" Year(s) "&""&TEXT(Month(T__c)-Month(F__c))&" Month(s) ",
IF(AND(Year(T__c)>Year(F__c),Month(T__c)>Month(F__c),Day(T__c)>Day(F__c)),TEXT(Year(T__c)-Year(F__c))&" Year(s) "&""&TEXT(Month(T__c)-Month(F__c))&" Month(s) "&""&TEXT(Day(T__c)-Day(F__c))&" Day(s) ",
IF(AND(Year(T__c)>Year(F__c),Month(T__c)>Month(F__c),Day(T__c)<Day(F__c)),TEXT(Year(T__c)-Year(F__c))&" Year(s) "&""&TEXT((Month(T__c)-Month(F__c))-1)&" Month(s) "&""&TEXT((30+Day(T__c))-Day(F__c))&" Day(s) ",

IF(AND(Year(T__c)>Year(F__c),Month(T__c)<Month(F__c),Day(T__c)=Day(F__c)),TEXT((Year(T__c)-Year(F__c))-1)&" Year(s) "&""&TEXT((30+Month(T__c))-Month(F__c))&" Month(s) ",
IF(AND(Year(T__c)>Year(F__c),Month(T__c)<Month(F__c),Day(T__c)>Day(F__c)),TEXT((Year(T__c)-Year(F__c))-1)&" Year(s) "&""&TEXT((12+Month(T__c))-Month(F__c))&" Month(s) "&""&TEXT(Day(T__c)-Day(F__c))&" Day(s) ",
IF(AND(Year(T__c)>Year(F__c),Month(T__c)<Month(F__c),Day(T__c)<Day(F__c)),TEXT((Year(T__c)-Year(F__c))-1)&" Year(s) "&""&TEXT(((12+Month(T__c))-Month(F__c))-1)&" Month(s) "&""&TEXT((30+Day(T__c))-Day(F__c))&" Day(s) ", 
TEXT(0) 
)))))))))

Formula is perfect, but it showing below error.

Error:  Compiled formula is too big to execute (5,153 characters). Maximum size is 5,000 characters.

Anyone can please sort out this.
Thanks in advance.

Thanks,
Manohar
Hi Experts,
 
One custom field named as ERP__c in Account Object.
Initial day’s data entry guy not entering the information about ERP__c field in Account object.
We have an Accounts more than 1,500.
Is there a way in Salesforce to automatically fill the ERP field info for existing account records data?
Anyone help me out.
Thanks in advance.

please find below image.

User-added image
What are people doing for numeric input fields where "no comma" is required ? I've seen the use of text fields but find this a bit odd especially if you need to use a number that is displayed as a integer without commas. I need this for non-arithemetic computations .

Appreciate best practices on this. Thanks.
Hi Experts,

In VF Pages code, {!$User.Name} It gives error.
Anyone please help me, how to fetch User object name field value into VF Page code.
Thanks in advance.
Hi All,

I have three fields.

Month__c -> Denotes month value (Ex. Jan, Feb etc)
Year__c -> Denotes Year value (Ex. 2013, 2014 etc)
Bill_Month__c -> Formula field need combination of both Month+Year (Ex. Nov 2013)

Please find below image.

User-added image

Thanks in advance.

Thanks,
Manohar
how do i get this "(GMT+04:30) Afghanistan Time (Asia/Kabul)"
to be storedin field like this

+4.30

I want to strip all except the plus sign and digits and ':' to be change to '.'
Thanks.
I have a url field that is populated by a third party integration.  This field uses http: to populate the url link.  I would like to convert the http: portion of the url to https: maintaining the remaining url information.  Can this be done?
Hi,

I have a formula field to pull the created date with the time,  but it is showing the seconds and the z.  How do I get rid of the seconds and z?  I've tried a couple of different ways and can get just the date or just the time, but not both.

TEXT(CreatedDate)


I have 1 field that is a datetime datatype and I need to be able to:

1. Split on the date & time using two separate fields for each

2. Convert the date to long date format -- January 7, 2010