function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Alanson09Alanson09 

Time Field in Salesforce

Hi, first time poster long time reader

 

In essence I am creaiting a new tab related to time based information

 

Having created all fields required, I have imported historic data.

 

Where I have times of 23:07 or 22:43

 

I am seeing only 23.0 or at best 22:4

 

Having read all the other forum help topics is there a simple way of formating my field to enable me to show 23:07 without displaying a date

 

If someone could be kind enough to post me a fools guide on how to do this I would be most grateful

 

Summary:

 

Simply want to be able to import times without creating or adding a date to the records 

Justine HeritageJustine Heritage

What do you currently have? What formula is giving you 23:0 and 22:4?

 

If you have these values stored somewhere as date/times, the best you can probably do is this:

 

MID( TEXT( date/time - TZoffset ), 12, 2 ) 

& ":" &

MID( TEXT( date/time - TZoffset ), 15, 2 )

 

where date/time is the DT value and TZoffset is the difference between your local time zone and GMT. For example, if your org is located in San Francisco, TZoffset would be represented by 7/24 because San Francisco time is GMT - 7. We divide by 24 to get the portion of a day 7 hours accounts for.