Advertisement
Guest User

Untitled

a guest
Apr 30th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. IF(
  2. OR(
  3. VALUE( MID( TEXT( ***date/time*** - TZoffset ), 12, 2 ) ) = 0,
  4. VALUE( MID( TEXT( date/time - TZoffset ), 12, 2 ) ) = 12
  5. ),
  6. "12",
  7. TEXT( VALUE( MID( TEXT( date/time - TZoffset ), 12, 2 ) )
  8. -
  9. IF(
  10. VALUE( MID( TEXT( date/time - TZoffset ), 12, 2 ) ) < 12,
  11. 0,
  12. 12
  13. )
  14. )
  15. )
  16. & ":" &
  17. MID( TEXT( date/time - TZoffset ), 15, 2 )
  18. & ":" &
  19. MID( TEXT( date/time - TZoffset ), 18, 2 )
  20. & " " &
  21. IF(
  22. VALUE( MID( TEXT( date/time - TZoffset ), 12, 2 ) ) < 12,
  23. "AM",
  24. "PM"
  25. )
  26.  
  27. <apex:page standardController="Opportunity" id="pg">
  28. <apex:outputField value="{!opportunity.createddate}" id="st">
  29. <script type="text/javascript">
  30. (function(){
  31. var fd = document.getElementById("pg:st");
  32. fd.innerHTML = field.innerHTML.substring(field.innerHTML.indexOf(' '));
  33. })();
  34. </script>
  35. </apex:outputField>
  36. </apex:page>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement