How do I call a function to change a value in a directive?

I need something like this, but it doesn't work

.directive('dateTime', function(){
        return {
            restrict: 'E',
            replace: true,
            scope:'=value',
            template: "<div>{{value.format('mmm dd yy')}}"</div>", 
                                    // ^here: applying a function to the scope  
         };
    });

You've created an isolate scope with scope: '=value' so this is a brand new scope that does not prototypically inherit from the parent scope. This means that any functions you want to call must be from

  1. a service, filter, etc. you injected into the directive
  2. another directive's controller, use require to get access (see the tabs and pane directives on the Angular home page for an example)
  3. a function you define in the directive's controller or in the link function on $scope (which are essentially the same thing) Example: http://stackoverflow.com/a/14621193/215945
  4. use the '&' syntax to enable the directive to call a function declared on the parent scope. Example: What is the best way to implement a button that needs to be disabled while submitting in AngularJS?

You might just be looking for the date filter:

{{value | date:'MMM dd yy'}}

but you can do this too:

app.directive('dateTime', function(){
        return {
            restrict: 'E',
            replace: true,
            scope:'=value',
            template: "<div>{{value | date:'MMM dd yy')}}"</div>", 
                                    // ^here: applying a function to the scope  
         };
    });