# Moderncv package / cventry with date and year

I am creating my resume in moderncv style format.

I wanted to enter a period like (eg: 05/2017--09/2017), and should be in a straight line.

But with the code \cventry{05/2017--09/2017} I am getting it like the image below.

I tried to use \setlength{\hintscolumnwidth}{0.25\textwidth} but, then my contents on the right are also moving.

Could some one suggest how I can get my month and year typed in a straight line.

• Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – Astrinus Jun 13 '18 at 9:58
• Anyway, your text simply does not fit into the space. You should enlarge the page margin (with the geometry package) and set an appropriate \hintscolumnwidth length (that might be fixed, thus not depending on \textwidth). – Astrinus Jun 13 '18 at 9:59
• had the same problem. I set \setlength{\hintscolumnwidth}{3cm} and dropped the leading 0 from the months. – naphaneal Jun 13 '18 at 12:27

The layout of command

\cventry{05/2017--09/2017}{Degree}{Institution}{City}{\textit{Grade}}{Description}


is defined in two columns: the first column takes the date {05/2017--09/2017}, the second column takes all other text.

With command \setlength{\hintscolumnwidth}{3cm} you can define 3cm to be used for the first column. In your case 3cm solved your problem ...

\documentclass[11pt,a4paper,sans]{moderncv}

% moderncv themes
\moderncvstyle{classic} % casual, classic, banking, oldstyle and fancy
\moderncvcolor{blue}

\usepackage[utf8]{inputenc}

\usepackage[scale=0.75]{geometry}
\usepackage{booktabs}

\setlength{\hintscolumnwidth}{3cm} % <==================================

% personal data
\name{John}{Doe}
\title{Resumé title}
\phone[mobile]{+1~(234)~567~890}
\phone[fixed]{+2~(345)~678~901}
\phone[fax]{+3~(456)~789~012}
\email{john@doe.org}
\homepage{www.johndoe.com}
\social[github]{jdoe}
\photo[64pt][0.4pt]{example-image-a}
\quote{Some quote}

\setlength{\footskip}{66pt}

\begin{document}

\makecvtitle

\section{Education}
\cventry{year--year}{Degree}{Institution--3}{City--4}{\textit{Grade}--5}{Description--6}  % arguments 3 to 6 can be left empty