Tutorial

Android Date Time Picker Dialog

Published on August 3, 2022
author

By Anupam Chugh

Android Date Time Picker Dialog

Android Date Time picker are used a lot in android apps. In this tutorial we’ll demonstrate the use of a Date Picker and Timer Picker Dialog in our android application. These components are used to select date and time in a customised user interface. We will use DatePickerDialog and TimePickerDialog classes with Calendar class in our android application code to achieve this.

Android DatePickerDialog and TimePickerDialog

Though a Date Picker and Time Picker can be used as independent widgets but they occupy more space on the screen. Hence using them inside a Dialog is a better choice. Fortunately android provides use with its own DatePickerDialog and TimePickerDialog classes. DatePickerDialog and TimePickerDialog classes have onDateSetListener() and onTimeSetListener() callback methods respectively. These callback methods are invoked when the user is done with filling the date and time respectively. The DatePickerDialog class consists of a 5 argument constructor with the parameters listed below.

  1. Context: It requires the application context
  2. CallBack Function: onDateSet() is invoked when the user sets the date with the following parameters:
  • int year : It will be store the current selected year from the dialog
  • int monthOfYear : It will be store the current selected month from the dialog
  • int dayOfMonth : It will be store the current selected day from the dialog
  1. int mYear : It shows the the current year that’s visible when the dialog pops up
  2. int mMonth : It shows the the current month that’s visible when the dialog pops up
  3. int mDay : It shows the the current day that’s visible when the dialog pops up

The TimePickerDialog class consists of a 5 argument constructor with the parameters listed below.

  1. Context: It requires the application context
  2. CallBack Function: onTimeSet() is invoked when the user sets the time with the following parameters:
  • int hourOfDay : It will be store the current selected hour of the day from the dialog
  • int minute : It will be store the current selected minute from the dialog
  1. int mHours : It shows the the current Hour that’s visible when the dialog pops up
  2. int mMinute : It shows the the current minute that’s visible when the dialog pops up
  3. boolean false : If its set to false it will show the time in 24 hour format else not

Android Date Time Picker Example Project Structure

android date time picker, android TimePickerDialog, android DatePickerDialog

Android Date Time Picker Dialog Project Code

The activity_main.xml consists of two buttons to invoke the Date and Time Picker Dialogs and set the user selected time in the two EditText views. The xml code is given below. activity_main.xml

<RelativeLayout xmlns:android="https://schemas.android.com/apk/res/android"
    xmlns:tools="https://schemas.android.com/tools" android:layout_width="match_parent"
    android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".MainActivity">

    <EditText
        android:layout_width="200dp"
        android:layout_height="wrap_content"
        android:id="@+id/in_date"
        android:layout_marginTop="82dp"
        android:layout_alignParentTop="true"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true" />

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="SELECT DATE"
        android:id="@+id/btn_date"
        android:layout_alignBottom="@+id/in_date"
        android:layout_toRightOf="@+id/in_date"
        android:layout_toEndOf="@+id/in_date" />

    <EditText
        android:layout_width="200dp"
        android:layout_height="wrap_content"
        android:id="@+id/in_time"
        android:layout_below="@+id/in_date"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true" />

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="SELECT TIME"
        android:id="@+id/btn_time"
        android:layout_below="@+id/btn_date"
        android:layout_alignLeft="@+id/btn_date"
        android:layout_alignStart="@+id/btn_date" />

</RelativeLayout>

The MainActivity.java class is given below:

package com.journaldev.datetimepickerdialog;

import android.app.DatePickerDialog;
import android.app.TimePickerDialog;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.DatePicker;
import android.widget.EditText;
import android.widget.TimePicker;

import java.util.Calendar;

public class MainActivity extends AppCompatActivity implements
        View.OnClickListener {

    Button btnDatePicker, btnTimePicker;
    EditText txtDate, txtTime;
    private int mYear, mMonth, mDay, mHour, mMinute;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        btnDatePicker=(Button)findViewById(R.id.btn_date);
        btnTimePicker=(Button)findViewById(R.id.btn_time);
        txtDate=(EditText)findViewById(R.id.in_date);
        txtTime=(EditText)findViewById(R.id.in_time);

        btnDatePicker.setOnClickListener(this);
        btnTimePicker.setOnClickListener(this);

    }

    @Override
    public void onClick(View v) {

        if (v == btnDatePicker) {

            // Get Current Date
            final Calendar c = Calendar.getInstance();
            mYear = c.get(Calendar.YEAR);
            mMonth = c.get(Calendar.MONTH);
            mDay = c.get(Calendar.DAY_OF_MONTH);


            DatePickerDialog datePickerDialog = new DatePickerDialog(this,
                    new DatePickerDialog.OnDateSetListener() {

                        @Override
                        public void onDateSet(DatePicker view, int year,
                                              int monthOfYear, int dayOfMonth) {

                            txtDate.setText(dayOfMonth + "-" + (monthOfYear + 1) + "-" + year);

                        }
                    }, mYear, mMonth, mDay);
            datePickerDialog.show();
        }
        if (v == btnTimePicker) {

            // Get Current Time
            final Calendar c = Calendar.getInstance();
            mHour = c.get(Calendar.HOUR_OF_DAY);
            mMinute = c.get(Calendar.MINUTE);

            // Launch Time Picker Dialog
            TimePickerDialog timePickerDialog = new TimePickerDialog(this,
                    new TimePickerDialog.OnTimeSetListener() {

                        @Override
                        public void onTimeSet(TimePicker view, int hourOfDay,
                                              int minute) {

                            txtTime.setText(hourOfDay + ":" + minute);
                        }
                    }, mHour, mMinute, false);
            timePickerDialog.show();
        }
    }
}

In the above code we’ve created a Calendar object using Calendar.getInstance() to display the current date and time using the respective static fields. Note: The display calendar and clock are the default UI themes as provided in the AppCompat Theme. Below is the output produced by our android date time picker example application. android date time picker example This brings an end to android date time picker dialog example tutorial. You can download the final Android DateTimePickerDialog Project from the below link.

Download Android Date Time Picker Project

Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.

Learn more about our products

About the author(s)

Category:
Tutorial
Tags:

While we believe that this content benefits our community, we have not yet thoroughly reviewed it. If you have any suggestions for improvements, please let us know by clicking the “report an issue“ button at the bottom of the tutorial.

Still looking for an answer?

Ask a questionSearch for more help

Was this helpful?
 
JournalDev
DigitalOcean Employee
DigitalOcean Employee badge
February 17, 2016

F*****g thank you! been googling for 3 hours and every other tutorial was either deprecated or vague and complex. this one i did it 5 mins and it worked perfectly.

- Araz

    JournalDev
    DigitalOcean Employee
    DigitalOcean Employee badge
    February 23, 2016

    A much simpler soultion than Googles examples with FragmentDialogs. Thanks!

    - Frederik Skytte

      JournalDev
      DigitalOcean Employee
      DigitalOcean Employee badge
      March 18, 2016

      Hi Anupam: Good Tutorial, I have the following question, I have an application where I want me to be the administrator of the calendar in which users enter and to request an appointment, but only I can accept and you get a message to users if it was or not accepted the appointment. I appreciate all your help and support.

      - Mario German

        JournalDev
        DigitalOcean Employee
        DigitalOcean Employee badge
        July 22, 2016

        Hi, I have copied these codes in my android project. the layout is correctly displayed but when I copy the java file It dosen’t work

        - kholio

          JournalDev
          DigitalOcean Employee
          DigitalOcean Employee badge
          August 19, 2016

          Thanks for this. Works perfect

          - PeterOla

          JournalDev
          DigitalOcean Employee
          DigitalOcean Employee badge
          August 27, 2016

          timePickerDialog.show(); showing error…please help

          - Suman Mondal

            JournalDev
            DigitalOcean Employee
            DigitalOcean Employee badge
            September 7, 2016

            Thank you very much!! Easier than the all examples i found.

            - Matheus Soares

              JournalDev
              DigitalOcean Employee
              DigitalOcean Employee badge
              September 26, 2016

              how to disable past date and time ??

              - gaurav

              JournalDev
              DigitalOcean Employee
              DigitalOcean Employee badge
              November 28, 2016

              datePickerDialog.getDatePicker().setMinDate(System.currentTimeMillis() - 1000);

              - saiumesh

                JournalDev
                DigitalOcean Employee
                DigitalOcean Employee badge
                November 3, 2016

                Thanks for so easy and very useful tutorial!

                - Shai

                  JournalDev
                  DigitalOcean Employee
                  DigitalOcean Employee badge
                  November 11, 2016

                  how to convert month from int to name? (eg. 1 -> january, 2 -> february), any idea from adding if else ?, great tutorial btw, works perfectly on me

                  - dan

                  JournalDev
                  DigitalOcean Employee
                  DigitalOcean Employee badge
                  November 28, 2016

                  Hi dan, Use enums. Thanks

                  - Anupam Chugh

                    JournalDev
                    DigitalOcean Employee
                    DigitalOcean Employee badge
                    December 15, 2016

                    How to display the time in 24 hours? Currently it is showing 12 hours format and i want 24 hours format…

                    - Monali Khairnar

                    JournalDev
                    DigitalOcean Employee
                    DigitalOcean Employee badge
                    January 9, 2017

                    Hi, Change the last parameter is24hourView from false to true as shown below. TimePickerDialog timePickerDialog = new TimePickerDialog(this, new TimePickerDialog.OnTimeSetListener() { @Override public void onTimeSet(TimePicker view, int hourOfDay, int minute) { txtTime.setText(hourOfDay + “:” + minute); } }, mHour, mMinute, true); Thanks

                    - Anupam Chugh

                      JournalDev
                      DigitalOcean Employee
                      DigitalOcean Employee badge
                      January 9, 2017

                      To allow only the days to come to be clickable and making previous days unclickable…!!how to do that in this?

                      - Joy

                      JournalDev
                      DigitalOcean Employee
                      DigitalOcean Employee badge
                      January 9, 2017

                      Hi, To display previous dates, add this line of code: datePickerDialog.getDatePicker().setMinDate(System.currentTimeMillis() - 1000); Thanks

                      - Anupam Chugh

                        JournalDev
                        DigitalOcean Employee
                        DigitalOcean Employee badge
                        January 23, 2017

                        Hi, I have created a date picker dialog and passed a custom year,date,day (ex, I have passed Feb, 2nd, 2016) .It shows me Feb 2nd is highlighted in all years. How can I avoid that and show Feb 2nd selected only in 2016.

                        - vamsi

                          JournalDev
                          DigitalOcean Employee
                          DigitalOcean Employee badge
                          January 30, 2017

                          hi i got error at c.get() method as “Call requires API level 24 (current min is 15)”

                          - swathi

                          JournalDev
                          DigitalOcean Employee
                          DigitalOcean Employee badge
                          March 26, 2017

                          Just clean ur project or rebuild

                          - BLYA SUKA IDI SUDA

                            JournalDev
                            DigitalOcean Employee
                            DigitalOcean Employee badge
                            February 17, 2017

                            Hey, Thank You! Its really helpful. saved my time.

                            - p

                              JournalDev
                              DigitalOcean Employee
                              DigitalOcean Employee badge
                              March 3, 2017

                              datePickerDialog.show(); showing error…please help

                              - nehal

                                JournalDev
                                DigitalOcean Employee
                                DigitalOcean Employee badge
                                March 21, 2017

                                thanks so much realy 2 nice work.

                                - rajender

                                JournalDev
                                DigitalOcean Employee
                                DigitalOcean Employee badge
                                August 16, 2017

                                Thanks, Rajender.

                                - Anupam Chugh

                                  JournalDev
                                  DigitalOcean Employee
                                  DigitalOcean Employee badge
                                  March 31, 2017

                                  I want to set the am and pm in the Timepicker field. can you please let me know how to set it.

                                  - Natraj

                                  JournalDev
                                  DigitalOcean Employee
                                  DigitalOcean Employee badge
                                  January 18, 2019

                                  Change your OnClickListener like below ;-) btnTimePicker.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { // Get Current Time final Calendar c = Calendar.getInstance(); mHour = c.get(Calendar.HOUR_OF_DAY); mMinute = c.get(Calendar.MINUTE); // Launch Time Picker Dialog TimePickerDialog timePickerDialog = new TimePickerDialog(Main.this,new TimePickerDialog.OnTimeSetListener() { @Override public void onTimeSet(TimePicker view, int hourOfDay,int minute) { private String format = “”; if (hourOfDay == 0) { hourOfDay += 12; format = “AM”; } else if (hourOfDay == 12) { format = “PM”; } else if (hourOfDay > 12) { hourOfDay -= 12; format = “PM”; } else { format = “AM”; } txtTime.setText(hourOfDay + “:” + minute + format); } }, mHour, mMinute, false); timePickerDialog.show(); } });

                                  - Hariharan

                                    JournalDev
                                    DigitalOcean Employee
                                    DigitalOcean Employee badge
                                    April 22, 2017

                                    TimePickerDailog.show(); DatePickerDailog.show(); Both are showing error …??

                                    - BHAWANI SINGH

                                      JournalDev
                                      DigitalOcean Employee
                                      DigitalOcean Employee badge
                                      April 28, 2017

                                      i want to know how to use start date to end date date picker in android fragment and condition is that end date date picker should be greater than start date datepicker can anybody help me

                                      - sachin

                                        JournalDev
                                        DigitalOcean Employee
                                        DigitalOcean Employee badge
                                        July 12, 2017

                                        Very helpfull

                                        - Pkvarnwal

                                          JournalDev
                                          DigitalOcean Employee
                                          DigitalOcean Employee badge
                                          November 29, 2017

                                          Awesome !

                                          - Sanjay

                                            JournalDev
                                            DigitalOcean Employee
                                            DigitalOcean Employee badge
                                            January 22, 2018

                                            is there is a way to open datepicker dialog as a yearlist view first then month then day

                                            - gaurav Meghanahthi

                                              JournalDev
                                              DigitalOcean Employee
                                              DigitalOcean Employee badge
                                              January 23, 2018

                                              Thanx It Helped me

                                              - bhati manish

                                                JournalDev
                                                DigitalOcean Employee
                                                DigitalOcean Employee badge
                                                April 26, 2018

                                                Great Help Anupam :)

                                                - Abhijeet

                                                  JournalDev
                                                  DigitalOcean Employee
                                                  DigitalOcean Employee badge
                                                  April 29, 2018

                                                  this is badly designed. the year needs to be set in a different field from the month or you have to tap on the screen for 10-15 minutes to go back to the average DOB.

                                                  - Ryan Kraetsch

                                                  JournalDev
                                                  DigitalOcean Employee
                                                  DigitalOcean Employee badge
                                                  September 25, 2018

                                                  You can directly click on the year and choose your required year . simple as that.

                                                  - LAKSHMAN

                                                    JournalDev
                                                    DigitalOcean Employee
                                                    DigitalOcean Employee badge
                                                    June 12, 2018

                                                    Very Helpful. Thank you

                                                    - Ghufran

                                                      JournalDev
                                                      DigitalOcean Employee
                                                      DigitalOcean Employee badge
                                                      July 27, 2018

                                                      very very easily expalined .I read so many articles for this like android developers documentation but this is very very easy

                                                      - sarath chandra damineni

                                                      JournalDev
                                                      DigitalOcean Employee
                                                      DigitalOcean Employee badge
                                                      July 30, 2018

                                                      Glad this helped you Sarath.

                                                      - Anupam Chugh

                                                        JournalDev
                                                        DigitalOcean Employee
                                                        DigitalOcean Employee badge
                                                        September 11, 2018

                                                        Finally i find this!!! Thanks a lot

                                                        - Иван Китаев

                                                          JournalDev
                                                          DigitalOcean Employee
                                                          DigitalOcean Employee badge
                                                          September 17, 2018

                                                          Awesome Work Man. Thanks for such great tutorials.

                                                          - Aman

                                                            JournalDev
                                                            DigitalOcean Employee
                                                            DigitalOcean Employee badge
                                                            September 26, 2018

                                                            Thankyou I easily understad

                                                            - Aniket kumar

                                                              JournalDev
                                                              DigitalOcean Employee
                                                              DigitalOcean Employee badge
                                                              March 5, 2019

                                                              DatePickerDialog datePickerDialog = new DatePickerDialog(this, new DatePickerDialog.OnDateSetListener() { @Override public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) { txtDate.setText(dayOfMonth + “-” + (monthOfYear + 1) + “-” + year); } }, mYear, mMonth, mDay); ^^^ I don’t understand why in the onDateSet method, year, monthOfYear and dayOfMonth are integers but they can pass into setText method which shoud pass value as String type ?

                                                              - buiminh15

                                                              JournalDev
                                                              DigitalOcean Employee
                                                              DigitalOcean Employee badge
                                                              July 16, 2019

                                                              The code in setText() is concatenation of string and int values. txtDate.setText(dayOfMonth + “-” + (monthOfYear + 1) + “-” + year); --------- value of int dayOfMonth + “-” + value of the addition(value of int monthOfYear + 1) + “-” + value of year --------- so if the date picked is 8th of April 2019 the resulting string will be “8-4-2019”

                                                              - BubbleTae

                                                                JournalDev
                                                                DigitalOcean Employee
                                                                DigitalOcean Employee badge
                                                                March 12, 2019

                                                                how to enable only next 7 days date

                                                                - Shaun Ritty

                                                                JournalDev
                                                                DigitalOcean Employee
                                                                DigitalOcean Employee badge
                                                                April 7, 2019

                                                                By this way you can solve your problem. set minimum current date like this mPickerDialog.getDatePicker().setMinDate(System.currentTimeMillis()); After that convert 7 days into Milliseconds like 7 Days =604800000 Milliseconds mPickerDialog.getDatePicker().setMaxDate(System.currentTimeMillis() +604800000); It will enable only 7 days from current date

                                                                - Chandeshwar

                                                                  JournalDev
                                                                  DigitalOcean Employee
                                                                  DigitalOcean Employee badge
                                                                  April 22, 2019

                                                                  please help me with datepicker i wanted to add two edittext with date picker as check in date and check out date

                                                                  - hazard_o7

                                                                    JournalDev
                                                                    DigitalOcean Employee
                                                                    DigitalOcean Employee badge
                                                                    June 19, 2019

                                                                    it’s not printing the AM ,PM after the time could you clarify me

                                                                    - Narendra

                                                                      JournalDev
                                                                      DigitalOcean Employee
                                                                      DigitalOcean Employee badge
                                                                      July 16, 2019

                                                                      Awesome Work! I spend a sweet ton of time trying to implement something like this. Thank you for sharing!

                                                                      - BubbleTae

                                                                        JournalDev
                                                                        DigitalOcean Employee
                                                                        DigitalOcean Employee badge
                                                                        July 28, 2019

                                                                        Can Only Month And Year ?

                                                                        - mocha

                                                                          JournalDev
                                                                          DigitalOcean Employee
                                                                          DigitalOcean Employee badge
                                                                          October 6, 2019

                                                                          REALLY GOOD TUTORIAL !!!

                                                                          - Arjun Verma

                                                                            JournalDev
                                                                            DigitalOcean Employee
                                                                            DigitalOcean Employee badge
                                                                            November 7, 2019

                                                                            Very nice and helpful. Thanks

                                                                            - Vonnie

                                                                              JournalDev
                                                                              DigitalOcean Employee
                                                                              DigitalOcean Employee badge
                                                                              November 27, 2019

                                                                              Bro iam extends fragment instead of activty so m getting error near context please help out. Thank You

                                                                              - arshad

                                                                              JournalDev
                                                                              DigitalOcean Employee
                                                                              DigitalOcean Employee badge
                                                                              January 16, 2020

                                                                              simply use “getContext()”

                                                                              - Pranav

                                                                                JournalDev
                                                                                DigitalOcean Employee
                                                                                DigitalOcean Employee badge
                                                                                February 14, 2020

                                                                                Hello can anyone help me where i would like to add two “Time Picker” in one activity not date only two time picker . This is my set onClickonListner Pickup.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { DialogFragment timePicker = new Timepicker(); timePicker.show(getSupportFragmentManager(), “Pickup Time”); } }); Dropoff.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { DialogFragment timePicker1 = new Timepicker(); timePicker1.show(getSupportFragmentManager(), “Drop off”); } }); and Display @Override public void onTimeSet(TimePicker view, int hourOfDay, int minute) { EditText Pickup = (EditText) findViewById(R.id.PUDT); Pickup.setText(hourOfDay + ": " + minute); }

                                                                                - Karan Patel

                                                                                  JournalDev
                                                                                  DigitalOcean Employee
                                                                                  DigitalOcean Employee badge
                                                                                  February 29, 2020

                                                                                  Thank you SO MUCH, You R the best

                                                                                  - Amal

                                                                                    JournalDev
                                                                                    DigitalOcean Employee
                                                                                    DigitalOcean Employee badge
                                                                                    March 30, 2020

                                                                                    Amazing, super thanks!

                                                                                    - Joseph Ali

                                                                                      JournalDev
                                                                                      DigitalOcean Employee
                                                                                      DigitalOcean Employee badge
                                                                                      June 8, 2020

                                                                                      when am changing time then time not changing in terminal but required when change the time then it should be change system time

                                                                                      - aakib

                                                                                        JournalDev
                                                                                        DigitalOcean Employee
                                                                                        DigitalOcean Employee badge
                                                                                        June 17, 2020

                                                                                        This tutorial is good thanks, but I have a little problem, when I click on the button my datapicker OK and CANCEL does not show for me to click on after I have picked the date. Please can any help me with that?

                                                                                        - Henry

                                                                                          JournalDev
                                                                                          DigitalOcean Employee
                                                                                          DigitalOcean Employee badge
                                                                                          June 30, 2020

                                                                                          hello How can i set By default PM Option from AM PM Selection…

                                                                                          - priyanka patel

                                                                                            JournalDev
                                                                                            DigitalOcean Employee
                                                                                            DigitalOcean Employee badge
                                                                                            June 30, 2020

                                                                                            great code is simple and understandable

                                                                                            - nagaraj

                                                                                              JournalDev
                                                                                              DigitalOcean Employee
                                                                                              DigitalOcean Employee badge
                                                                                              August 4, 2020

                                                                                              Thank you so much, date picker code fragment was helpful to me, i cant display a datepicker dialog in my dialog form, that code is very simple and understandable, so you are a genius.

                                                                                              - Pedro Avellaneda

                                                                                                JournalDev
                                                                                                DigitalOcean Employee
                                                                                                DigitalOcean Employee badge
                                                                                                September 18, 2020

                                                                                                Thank you for sharing this code. My project went smooth because of yours…

                                                                                                - Anom Harya

                                                                                                  JournalDev
                                                                                                  DigitalOcean Employee
                                                                                                  DigitalOcean Employee badge
                                                                                                  November 28, 2020

                                                                                                  Thank you! I was looking at the so-called Clock UI. I hope you could fix the code that was wrap in lines. It’s a bit confusing to read.

                                                                                                  - Mohsen

                                                                                                    Join the Tech Talk
                                                                                                    Success! Thank you! Please check your email for further details.

                                                                                                    Please complete your information!

                                                                                                    Become a contributor for community

                                                                                                    Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

                                                                                                    DigitalOcean Documentation

                                                                                                    Full documentation for every DigitalOcean product.

                                                                                                    Resources for startups and SMBs

                                                                                                    The Wave has everything you need to know about building a business, from raising funding to marketing your product.

                                                                                                    Get our newsletter

                                                                                                    Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

                                                                                                    New accounts only. By submitting your email you agree to our Privacy Policy

                                                                                                    The developer cloud

                                                                                                    Scale up as you grow — whether you're running one virtual machine or ten thousand.

                                                                                                    Get started for free

                                                                                                    Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

                                                                                                    *This promotional offer applies to new accounts only.