You must be new to AE. Go get started please check out this tutorial: Basic Workflow
If your rendered video is a different length than your composition then you have not matched the composition settings to the output module or the render settings in the Adobe Media Encoder. You did not follow the proper workflow. Check the comp settings first for duration, frame rate, and frame size. It should be one of the default Square Pixel Presets. If it says Custom in the Preset Field then you're probably doing something wrong.
Next, check the render settings. Make sure that the comp is set to render the entire length of the comp and not just the work area. Until you know exactly what you are doing use one of the standard presets in the Output Module or one of the standard presets in the Adobe Media Encoder for H.264. If you can't find the problem then we need a detailed description of your workflow and your composition and render settings. Screenshots will help. You should also include your OS and version of AE down to the last decimal point.
A 2 minutes Video Created by After Effect But After Exporting,It become a 3 seconds Video What should I do?
Unless we have additional information BEYOND a simple project file, the easy answer is, "Give up!"
That's not what you want. So Here's what we need to know: