Questions tagged [time]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
14 views

Time dropdown will not disappear after I select a time

I am using apex:inputText and time ui-timepicker-input in order to allow the user to enter a specific time onto my visualforce page. Currently, when I select a given time, the time appears within the ...
0
votes
1answer
52 views

Why do my apex code uses other time zone?

I'm running this code to get a DateTime and change the time of it to a preset one DateTime dt = Datetime.newInstanceGMT(2021, 11, 8, 12, 0, 0); Time t = Time.newInstance(8, 0, 0, 0); System.debug('...
1
vote
1answer
29 views

Your organization has reached its hourly limit for processing workflow time triggers

There are a lot of similar question, but I'm trying to research why I get this message. I was looking into scheduled jobs and time based workflow. I am aware of the limits. Since I didn't find ...
-1
votes
1answer
109 views

How to compare two different times in formula

So we receive a check-out time which is the date/time field and I want to compare that time to see if it is greater than 12 PM. This will help decide if I need to charge a full day or half-day. ...
0
votes
1answer
87 views

Pass time variable from Javascript to Apex

Im trying to send time variable from LWC javascript To apex but not able to do that because of the format. what is the correct format in which I can send the time variable. Tried sending in the ...
0
votes
0answers
37 views

I cannot receive Salesforce Alert in Slack Channel at specific time

I have completed the integration between Salesforce and Slack. But I only can receive alerts between 12AM - 12PM in CST(Chinese Standard Time) at weekdays, or all days at weekends. Is there anyone ...
0
votes
2answers
112 views

DateTime value difference in UI and Soql query

The external System updates the date time field as 2021-03-15T09:00:00.000+0000. When I query the SOQL is also returning the same value. But when EST time zone user logins, the record suppose to show ...
1
vote
1answer
444 views

lightning:input type="time" displays millisecond value when editing object

I am building a lightning component to create/edit custom objects. I've been able to do this with force:inputFields in the past but unfortunately ran into a component error that the new recommended ...
0
votes
1answer
47 views

difference of two date time field in days and hours

How can I show the difference of two date time fields in days and hours. I am trying to do this in a formula field or process builder. Example: 16/10/2021 11:00am - 15/10/2021 10:00am = 1 day 1 hour
0
votes
0answers
120 views

Time format is changing from(hh:mm:ss) to number

I have created a custom field of time datatype. I am using this custom field in my lightning component. It is displayed in number. <lightning:input type="Time" value="{!d.Sign_Out__c}...
0
votes
1answer
21 views

Time Difference in minutes on 2 'Time' Data type

I have 2-time fields (Start time and End Time). I need to calculate the difference in minutes. I have tried with below code, but does not work. Double var = Math.Floor((Double.valueOf(mem.End__c....
1
vote
2answers
341 views

In Apex, how can I format Datetime for Europe/Berlin without assuming the input value is GMT?

I currently have the following function: public String formatForGermany(Datetime targetTime) { return this.format(targetTime, 'Europe/Berlin'); } private String format(Datetime targetTime, String ...
2
votes
1answer
28 views

What is the best way to correctly create a string with a time queried from SOQL which needs to be displayed to Germans?

We have a custom Datetime field on a custom object, Appointment__r.Start_Date__c. At 6pm, the day before the appointment, we must send every customer with an appointment an SMS which reminds them of ...
1
vote
1answer
2k views

Salesforce displaying Time custom field in GMT instead of User's timezone

We are facing an issue with BST and GMT time zone. We have a community portal and the org timezone and all the Users timezone are set as BST. Part of our functionality is to book an event and we ...
0
votes
0answers
182 views

Deploying lightning web component from VScode to sandbox takes more time

I am trying to deploy lightning web component from VScode to the sandbox using the command SFDX:Deploy Source to Org. It was working fine previously but for the past 2 days, deploying is taking more ...
0
votes
1answer
79 views

How to format my Salesforce time field for input in visualforce?

I have a time field (new time field format) called Time_In_1__c in a visualforce page. When I enter a value such as "3:00 pm" and hit save, Salesforce displays the value as 15:00:00:000. I'...
0
votes
1answer
60 views

How to use time field as an input field in VF Page?

In Salesforce record, the time field shows as a picklist but when I add the same time field to Visualforce page in a form, it only displays as a text field. Am I missing anything here? Visualforce: &...
0
votes
0answers
33 views

Why time Aura input doesnt display values as expected?

Im using lightning inputs for web compononent and for aura lightning LWC: <lightning-input data-formfield="Open1" type="time" variant="label-hidden" value={mondayOpenTime} disabled={mondayOpen}...
0
votes
0answers
29 views

Error pushing Time from WebForm to SalesForce (Using JSForce as connector and direct REST to Push) [duplicate]

I am building a NodeJS WebApp, that serves up a form, User fills it out, submits it, and then pushes the data from the form to SalesForce. The App uses JSForce for Authentication, and then it uses a ...
0
votes
1answer
497 views

How to trim out "Date" from Date/Time field in Salesforce?

I have a Date/Time field (call it Field A) that gets populated by an external system, i'd like to create another field that trims/extracts the Time value from Field A. I want to do this to use a ...
2
votes
2answers
280 views

CreatedDate of new record (Time)

My Org is set to GMT+1 which is my timezone. (Stated in the Company Information). I have created a record at 11:30 am but when I retrieve the CreatedDate field it says that it was created at 10:30 am....
1
vote
1answer
1k views

Process builder conditions when custom date/time is NOW()

Should be simple but I'm getting stuck on the formula Building a workflow in process builder and trying to trigger an action when custom object's custom date/time field is NOW().
0
votes
0answers
142 views

Time calculation in apex

My requirement is to assign records if the lastmodifiedDate of the record falls within the employee availability. For example let's say on Sunday employee available between 8.00 AM to 5.00 PM and if ...
2
votes
0answers
185 views

Add 30 minutes to a Time field using formula

I'm trying to set a formula time field as the result of adding 30 minutes to a time field that returns TRUE in the following comparison.: Time formula field is: TimeEndWorkingHoursControl__c = ...
2
votes
1answer
177 views

How to get time left on OrgPartition from Platform Cache?

Is it possible to get the time left from Platform Cache for a particular partition? You initiate by: Cache.OrgPartition orgPart = Cache.Org.getPartition('local.myStore'); You put the value by (...
0
votes
2answers
703 views

Format AM/PM DateTime to 24 hour time

I have a data 9/14/2019 4:37:57 PM I want to format this to: 20190914T163757 How do I format it so that if it includesPM to 24hour using ampscript?
1
vote
0answers
343 views

JSON time fields

We have a problem with deserialize and serialize salesforce time fields Since Json and salesforce time fields both consist of "colon" we need to replace with a special character before deserialize ...
0
votes
0answers
194 views

DateTime newInstance doesnt get in user locale

In my code I try to set datetime based on selected location. The Idea is, when the user select locale and then the time, record will be saved with selected datetime value based on selected locale. But ...
1
vote
0answers
50 views

How to get records created between timeframe in a report

I need to create a report of all the records between 7am to 5pm CST/CDT everyday. How can I achieve this? The solution I tried - Created a formula field which extracts Hours from created date (...
1
vote
0answers
213 views

Is it possible to calculate the difference between 2 Time Fields with Formula?

I am trying to calculate the difference between 2 Time-fields with a FORMULA . (So no DateTime) I know it is possible in Apex, but I am wondering if it is possible in a Formula as well. I tried a lot ...
0
votes
1answer
1k views

Time field based on TimeZone

Is Salesforce time field dependant on timezone. Is the time field value change based on TimeZone.
-3
votes
1answer
2k views

System.SObjectException: Invalid field Name for Contact

I'm Having an Apex Class which I used to deserialize the JSON. I'm calling the function which passed the string and sObject name which is Contact. This is my String which i passed in the function ...
2
votes
1answer
758 views

Format date time field to specific time with AMPscript in Marketing Cloud

I have a question; we are trying to send an appointment confirmation through Journey Builder. Now we are struggling to get the time right. It looks like there is added 1 and sometimes 2 minutes to the ...
0
votes
2answers
1k views

TIMENOW() subtraction

I am trying to find out the difference between the current time and 5PM. I tried numerous variations and I just can't make sense of the results I am getting. Lets say current time is 15:36 (3:34 PM) ...
0
votes
2answers
717 views

Calculate time difference between two date time fields

I have a process builder by which I am calculating the time difference between NOW() and another Case object date field. My formula goes like this Time_Spent__c = NOW() - Start_Time__c However ...
1
vote
2answers
1k views

How to remove AM & PM from Time field?

I have a custom field with DataType is TIME. I want to remove AM and PM from the Field. How can I do this?
2
votes
3answers
3k views

Merge Date & Time field in to datetime field using formula field

We have to separate fields to pick appointment date & appointment time in Custom object. Now we have to filter out appointments between two dates (w/ time), so I need to compare appointment date &...
2
votes
1answer
4k views

How to output time field in lightning component

I have used a time field which I want to show in a lightning component When I fill 8:00 in my field my result is 30600000 in my lightning component. I have searched for a time tag or formatting but ...
2
votes
3answers
2k views

Time Field on Data Load - "value not of required type: 5:33 PM"

I am attempting to insert some records on a custom object that requires a value in the Time Received field, of type Time. Within an existing record (created manually) the value inside the detail page, ...
3
votes
1answer
6k views

Cannot deserialize instance of time from VALUE_STRING value

I'm trying to parse a Time field from my lightning component to my apex controller by using JSON and deserializing it in apex into an existing Object. But unfortunately I'm always getting the error ...
0
votes
1answer
743 views

Making 24 hours difference in formula

what is 1.8 in this expression. I have seen people using now() + (-1.8) or now() + (1.8) for making 24 hours difference. What exactly is 1.8
0
votes
0answers
17 views

Enable using time type field in our production

We want to use the new time field in prod. However, it doesn't seem to be available yet in our prod. It seems to be there in our sandboxes though. Is there a way we can enable this beta feature?
0
votes
2answers
4k views

Formating the new time field in Visualforce

I am trying to format the new Time field type in Visualforce but with no success. I'm trying to use the same method as i use for date formatting but it does not compile my code with the error: '...
0
votes
1answer
1k views

Time comparison in Apex

I have below code Time startTime = objAvailableTime.StartTime; Time endTime = objAvailableTime.EndTime; List<Time> lstTime = new List<Time>(); ...
0
votes
1answer
149 views

Application limits

My collegue has received the below notification. We have never received this before. Can anyone please advise what action needs to be taken? Your organization has reached its hourly limit for ...
2
votes
0answers
2k views

How to Avoid exceeding CPU Time Limit in Test Classes?

I am currently updating test classes in our org and it seems that most of them are exceeding the CPU Time Limit. They are using the @testSetup to create a lot of test data and it seems that these DML ...
0
votes
1answer
250 views

How to Create Time Lapse duration field

In our organisation multiple teams working on a single Business process (record type of Case). Means multiple teams works on a single Case. So, we have a requirement to calculate how much time taken ...
2
votes
4answers
31k views

How can I get my correct current local time?

I need to get the current time but to be in type DateTime. I use: DateTime now = System.now(); but it returns wrong time. I execute the code in 2017-08-04 00:38:46 AM but it returns 00:38:46:023 ...
0
votes
1answer
640 views

DateTime set to an hour earlier

I have an object of type Time startWorkingTime and object of type DateTime nextBusinessDay. I want to create new object of type DateTime based on startWorkingTime and nextBusinessDay. Here is my code:...
0
votes
0answers
652 views

Creating Time picker in lightning

Can Anyone please help me with creating time picker in lightning ? There is a component ui:inputDateTime for having time & date picker both at the same time and there is a single component for ...