How to date

How to date

How to Date Online

A lot of my single friends moan to me about how hard it is to date online. I can’t help but notice, though, that I hear very different complaints from men than from women (at least the straight ones—my gay friends are another matter).

Men looking to meet women online often tell me they feel frustrated because women don’t write back to them. Women, on the other hand, tell me they get quantity rather than quality in terms of men writing to them. It doesn’t take a genius or The Love Queen to deduce that these two problems are related. As someone with a bit of insight into both sides’ concerns, here is my advice.

Scroll down for the dating advice for all you ladies!

Table of Contents

How to date online – Advice for Men

Men: Look for similarities

Many men make the mistake of writing to a woman they’ve seen on an online dating site, solely on the basis of her photo and geographic proximity. But selecting the hottest babe in your zip code isn’t the best formula for getting you dates. I’m not suggesting you choose someone you don’t find attractive—instead, choose attractive women with whom you seem to have something in common.

What to write in your first message

You are almost guaranteed to fail if you write to a woman on a dating site telling her “You are gorgeous/sexy/hot.” Sorry to break it to you, but this kind of e-mail makes you seem generic and boring. Most reasonably attractive women with online dating profiles receive dozens of those kind of responses per week—in some cases, dozens per day. Your compliment won’t stand out from all the other responses in her inbox. She’ll be bored–not because she’s vain, but because you haven’t said anything to convince her the two of you belong together.

However, if you choose to write to women who share your interests, you gain many opportunities for intriguing opening lines. Set your search parameters to find a woman who enjoys the same authors, TV shows, movies or hobbies as you. Then write her with an intelligent observation—something along the lines of “I love author X’s books, too. Which one is your favorite?” Or if both of your profiles reveal a love of hiking, share a short anecdote about your favorite trail, then ask about her recent experiences in the great outdoors. If she writes in her profile that she is studying a foreign tongue you happen to speak, open your first email to her by saying in that language “How was your day?”

Sometimes it’s necessary to do a bit of tweaking your profile to make this work. If a gorgeous woman in your area writes in her profile that she loves science fiction, go back and amend your profile to include our favorite sci-fi books or movies. I definitely don’t advocate dishonesty here—if you hate sci-fi and her profile doesn’t reveal any other common ground with you, simply move on. You’re better off approaching another woman who does share your enthusiasm for surfing or Italian food or country music. Remember, there’s no such thing as an abstract “perfect woman.” But there is a woman who may be perfect for you (either long-term or short-term). The secret to finding that perfection is by emphasizing similar beliefs and interests.

How to Date online: Advice for Women

Women: Learn the art of weeding out

Women are often encouraged from childhood onward to be as likable as possible. We learn at our mothers’ knees to please others. This can actually work against us when placing an online profile. I tell all my single girlfriends who are looking for a man online and frustrated with wading through boringly similar (or offensively forward) responses: don’t be too likeable.

To find someone who clicks with you, someone who will like you for more than your cute smile and killer bod, talk about some of your personal quirks. A man who is naïve and immature enough to want the “ideal woman” is less likely to waste your time if you reveal in your profile one or two of the things that make you a specialized, rather than a mass-market, girlfriend. State up front, for instance, that you hate football. Or write about how much you dislike cooking. You don’t have to write a book about your little oddities and preferences—just a few succinct lines, couched in a humorous tone. The result will be fewer men writing you, but those responses you receive will be from men more likely to appreciate you for who you are, not someone seeking to project some adolescent dream girl image onto you.

Men and Women: Final Online Dating Advice

Be unique but don’t be weird! My friend tried talking to a guy online who within minutes was asking her really personal questions and things like ‘what do you miss most about not being in a relationship? for me its cuddles.’ This might sound really cute and it would be once you have created some intimacy but its not a good starter as it makes you seem intense and maybe a stalker!

Conversely a male friend of mine was asked to read a specific book and tell her his opinion of it. He googled it and read the synopsis and realised it was about a man who was always horrible to women but got his comeuppance in the end. So it was a not very hidden attempt to see if he is a good guy or not, but its way too obvious, and is actually a way to attract abusers unfortunately since they will spot you as someone vulnerable. A nice twist on this could just be to ask a guy to read a book you really like, but make sure you choose the book carefully as your taste will reveal a lot about you!

If you feel nervous when chatting online to potential dates, why not get a friend round to help you with what to say, another’s perspective can be great but choose the right friend for the job.

Read this if you want to know more about how to fill in the best online dating profile.

This Oracle tutorial explains how to use the Oracle/PLSQL TO_DATE function with syntax and examples.


The Oracle/PLSQL TO_DATE function converts a string to a date.


The syntax for the TO_DATE function in Oracle/PLSQL is:

Parameters or Arguments

Optional. This is the format that will be used to convert string1 to a date. It can be one or a combination of the following values:

Parameter Explanation
YEAR Year, spelled out
YYYY 4-digit year
Last 3, 2, or 1 digit(s) of year.
Last 3, 2, or 1 digit(s) of ISO year.
IYYY 4-digit year based on the ISO standard
RRRR Accepts a 2-digit year and returns a 4-digit year.
A value between 0-49 will return a 20xx year.
A value between 50-99 will return a 19xx year.
Q Quarter of year (1, 2, 3, 4; JAN-MAR = 1).
MM Month (01-12; JAN = 01).
MON Abbreviated name of month.
MONTH Name of month, padded with blanks to length of 9 characters.
RM Roman numeral month (I-XII; JAN = I).
WW Week of year (1-53) where week 1 starts on the first day of the year and continues to the seventh day of the year.
W Week of month (1-5) where week 1 starts on the first day of the month and ends on the seventh.
IW Week of year (1-52 or 1-53) based on the ISO standard.
D Day of week (1-7).
DAY Name of day.
DD Day of month (1-31).
DDD Day of year (1-366).
DY Abbreviated name of day.
J Julian day; the number of days since January 1, 4712 BC.
HH Hour of day (1-12).
HH12 Hour of day (1-12).
HH24 Hour of day (0-23).
MI Minute (0-59).
SS Second (0-59).
SSSSS Seconds past midnight (0-86399).
AM, A.M., PM, or P.M. Meridian indicator
AD or A.D AD indicator
BC or B.C. BC indicator
TZD Daylight savings information. For example, ‘PST’
TZH Time zone hour.
TZM Time zone minute.
TZR Time zone region.


The TO_DATE function returns a date value.

Applies To

The TO_DATE function can be used in the following versions of Oracle/PLSQL:

  • Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i, Oracle 8i


Let’s look at some Oracle TO_DATE function examples and explore how to use the TO_DATE function in Oracle/PLSQL.

You could use the TO_DATE function with the dual table as follows:

This would convert the string value of 2015/05/15 8:30:25 to a date value.

If writing dates has you stymied at times, it is probably for one of two reasons. The first is that date formats vary the world over, and we come across these different styles frequently in our reading. The second may be that you aren’t quite sure how to write dates with commas.

The key to overcoming your struggle with dates is to understand the prevailing conventions and then apply them clearly—and consistently.

How to Write the Year

Years should be expressed as numerals except at the beginning of a sentence. Most style guides agree that beginning a sentence with a numeral is poor style, so years placed at the beginning of a sentence should be written out as words. American writers tend not to use and after thousand when expressing a year after 2000 in words, but it is common in British English. Both are correct.

Nineteen twenty-nine brought the Great Depression, the St. Valentine’s Day Massacre, and an influenza epidemic.

Much happened in the political arena in 2016.

Two thousand and sixteen was an eventful year in politics.

Two thousand sixteen was an eventful year in politics.

How to Write the Month and Day

When referring to a specific date in the month-day date format, use cardinal numbers (one, two, three) rather than ordinal numbers (first, second, third). This may feel counterintuitive because we normally use ordinal numbers when we “speak” of dates. For example, one would say January first two thousand seventeen but write January 1, 2017. In British English, ordinals can sometimes be used—it is acceptable to use them when writing dates, although it is not required, as our example shows.

Many people get confused about how to write dates with commas, so here is a rule of thumb: in the month-day-year format (used in the United States), place commas after the day and year. In the day-month-year format (used in the UK and other countries), do not use commas at all.

If you use a construction using of, it is fine to use an ordinal number. It is also fine to use an ordinal number when referring to a specific day without reference to the month.

How to Write Dates with Days of the Week

When writing a long-form date, use a comma after days of the week to ensure readability.

Monday, May 5, is my last day of work.

How to Write Centuries

For example, when we write the 1800s, we are referring to all the years from 1800 to 1899. Within that range are one hundred discrete years; that is, more than one: a plural. We can also refer to those years collectively as the nineteenth century in all lowercase letters.

How to Write Decades

This is the way to think about writing decades using numbers: they are both abbreviations and plurals. A shorter way of saying “My mother was born in the 1940s” is “My mother was born in the ’40s.” The apostrophe (not an opening single quotation mark) indicates where the two century digits would be, had they been included. There is no need to put an apostrophe between the zero and the s—that would incorrectly indicate a possessive.

Writing Dates as Numerals

All-numeral date styles should not be used in formal writing, but there may be times when it is appropriate to use them. When you do, be aware that not all countries express dates with numerals in the same way. American usage calls for a month/day/year date format, the United Kingdom and much of Europe use a day/month/year format, and most countries in Asia use the year/month/day format. Some countries use a combination of these depending on context (Canada, for example, uses all three, depending on who is the recipient of the communication).

So remember, if you are American and you write to your British friend inviting him to celebrate Independence Day on 7/4 with you, you can expect your guest to arrive on April 7 (which he will express as 7 April). Likewise, if he invites you to his Guy Fawkes Day party on 5/11, you will need to mark your calendar for November 5 rather than May 11.

JavaScript Date Input

There are generally 3 types of JavaScript date input formats:

Type Example
ISO Date “2015-03-25” (The International Standard)
Short Date “03/25/2015”
Long Date “Mar 25 2015” or “25 Mar 2015”

The ISO format follows a strict standard in JavaScript.

The other formats are not so well defined and might be browser specific.

JavaScript Date Output

Independent of input format, JavaScript will (by default) output dates in full text string format:

JavaScript ISO Dates

ISO 8601 is the international standard for the representation of dates and times.

The ISO 8601 syntax (YYYY-MM-DD) is also the preferred JavaScript date format:

Example (Complete date)

The computed date will be relative to your time zone.
Depending on your time zone, the result above will vary between March 24 and March 25.

ISO Dates (Year and Month)

ISO dates can be written without specifying the day (YYYY-MM):


Time zones will vary the result above between February 28 and March 01.

ISO Dates (Only Year)

ISO dates can be written without month and day (YYYY):


Time zones will vary the result above between December 31 2014 and January 01 2015.

ISO Dates (Date-Time)

ISO dates can be written with added hours, minutes, and seconds (YYYY-MM-DDTHH:MM:SSZ):


Date and time is separated with a capital T.

UTC time is defined with a capital letter Z.

If you want to modify the time relative to UTC, remove the Z and add +HH:MM or -HH:MM instead:


UTC (Universal Time Coordinated) is the same as GMT (Greenwich Mean Time).

Omitting T or Z in a date-time string can give different results in different browsers.

Time Zones

When setting a date, without specifying the time zone, JavaScript will use the browser’s time zone.

When getting a date, without specifying the time zone, the result is converted to the browser’s time zone.

In other words: If a date/time is created in GMT (Greenwich Mean Time), the date/time will be converted to CDT (Central US Daylight Time) if a user browses from central US.

JavaScript Short Dates.

Short dates are written with an “MM/DD/YYYY” syntax like this:



In some browsers, months or days with no leading zeroes may produce an error:

The behavior of “YYYY/MM/DD” is undefined.
Some browsers will try to guess the format. Some will return NaN.

The behavior of “DD-MM-YYYY” is also undefined.
Some browsers will try to guess the format. Some will return NaN.

JavaScript Long Dates.

Long dates are most often written with a “MMM DD YYYY” syntax like this:


Month and day can be in any order:


And, month can be written in full (January), or abbreviated (Jan):



Commas are ignored. Names are case insensitive:


Date Input – Parsing Dates

If you have a valid date string, you can use the Date.parse() method to convert it to milliseconds.

Date.parse() returns the number of milliseconds between the date and January 1, 1970:


You can then use the number of milliseconds to convert it to a date object:


Complete JavaScript Date Reference

For a complete Date reference, go to our:

The reference contains descriptions and examples of all Date properties and methods.

I don’t like dating. Mostly because no one seems to understand what dating is supposed to be anymore. These days, there are so many different ways to define a “date.”

Listen, there is nothing wrong with casually hooking up, as long as you’re both honest and direct about your boundaries and intentions.

I know that sometimes, this can be easier said than done. In fact, I was so used to pseudo-dating that when I found myself on an actual date — like meeting up for drinks or coffee — I didn’t know how to act. The truth is, I wasn’t quite sure what a “real date” was supposed to look like. So, I’ve compiled a list of things that are supposed to happen on real dates for you, so you don’t have to stress.

If you’re going on a date, but aren’t sure how to behave, there’s no need to panic. It’s totally natural to experience some pre-meeting butterflies. And If you can’t remember what it’s like to truly date someone — and I can’t blame you for that — there are a few things that might happen.

1. You feel a little nervous.

If you’re not excited about the date, then why in the world are you going on the date in the first place? Pre-date jitters are totally natural and can be a product of the thrill that comes with connecting with someone new. However, you never need to do anything that makes you uncomfortable. So if your nerves begin to take a toll, it’s always 100% OK to cancel or schedule. Do what’s best for you and your mental health.

2. You spend a lot of time getting ready.

In the same vein as number one, if you find yourself spending an extra five minutes curling your hair or changing your outfit 17 times before a first date, don’t freak out. The time you spend getting ready could be a reflection of your nerves and excitement. But remember: The first impression you make on a date isn’t about what you wear, but who you are.

3. You coordinate when to meet.

Before a first date, you and your crush might message a bit about what time and where to meet. Whether you meet them at the restaurant, pick them up on your way there, or ask them to show up at your doorstep, coordinating busy schedules is a typical precursor to a first date.

4. You make small talk.

When you first meet up with your crush, whether that’s at the date spot or beforehand, it might take you a little bit of time to warm up to each other. If the beginning of the conversation takes a while to get into a groove, don’t worry! Chemistry can often build over time, and participating in a bit of small talk is no indication that your date won’t be one for the books.

5. You discuss what you’re going to order.

Whether your first date is at that cool new bar across town, a swanky restaurant, or your favorite coffee shop, looking over the menu and discussing what to order can be a great way to break the ice. You might even decide to go halfsies and share a couple of bites!

6. You ask each other questions.

The best way to get to know someone on a first date is by asking a lot of questions. Where did they grow up? How many siblings do they have? What’s their favorite TV show? Of course, you’ll want to be respectful of their boundaries. If your date says or implies that there’s a topic of conversation that’s off-limits, change the subject and ask about something else. Open and honest discussion is a great way to learn about someone new.

7. You actively listen to each other.

Once you ask each other questions, be sure to take a step back and actively listen to one another. Engage with each story, ask follow-up questions, and allow each point to lead into the next. Don’t just hear what they’re saying — listen closely. Active listening can help a match burn into a flame.

8. You figure out how to pay the bill.

When it comes to picking up the tab, whatever works best for you and your date is the right way to pay. Whether you or your date insist on treating or you split the check right down the middle, as long as you both feel comfortable, there’s no one correct way to pick up the bill. Just don’t dine and dash, folks!

9. You say goodnight and part ways.

Maybe one of you walks the other home, as you continue your conversation. Or perhaps, you say goodbye at the date-spot and call an uber right then and there. Whatever you decide to do, if you enjoyed your time together, make sure to express it directly. Communicate and make your intentions known.

10. Or you spend the night together.

There’s nothing wrong with going home together after a great first date, as long as you’re both on the same page about your intentions and boundaries, and actively discuss consent. As long as all parties feel cared for and supported, feel free to follow your heart and your loins.

11. You discuss the future.

No need to wait three days — if you had a great first date, feel free to bring up seeing each other again. On the other hand, if you didn’t feel a spark, you can thank your date for a lovely evening, but communicate about how you feel, to avoid leading them on. Whatever the case, open up a conversation, and be prepared to walk away if either of you doesn’t feel the same connection.

Remember: A great first date is entirely dependent on the individuals who plan it. Whether you make small talk for hours or walk each other home, a date is supposed to look like whatever feels right to you.

Additional reporting by Iman Hariri-Kia.

If you want to convert date-time format cell to date value only such as 2016/4/7 1:01 AM to 2016/4/7, this article can help you.

The following formula will help you converting date/time format cell to date only in Excel.

1. Select a blank cell you will place the date value, then enter formula =MONTH(A2) & “/” & DAY(A2) & “/” & YEAR(A2) into the formula bar and press the Enter key.

2. You can see only the date value is populated in the selected cell based on the date/time cell. Keep selecting the date cell, then drag the Fill Handle down to display all dates based on other date/time cells. See screenshot:

This section will show you how to easily remove all times from selected date cells with the Remove time from date utility of Kutools for Excel. Please do as follows.

Before applying Kutools for Excel, please download and install it firstly.

1. Select a blank cell for locating the date after removing time from (says C2). Click Kutools > Formula Helper > Formula Helper. See screenshot:

2. In the Formulas Helper dialog box, please configure as follows.

  • In the Choose a formula box, find and select Remove time from date;
    Tips: You can check the Filter box, enter certain word into the text box to filter the formula quickly.
  • Select the cell with datetime you need to keep only date in the DateTime box;
  • Click the OK button.

3. Keep selecting the first result cell, then drag the Fill Handle down to get all results as you need as below screenshot shown:

Now all times are removed from specified dates.

If you want to have a free trial ( 30-day) of this utility, please click to download it, and then go to apply the operation according above steps.

Here I recommend you a handy tool – Kutools for Excel. With its Apply Date Formatting utility, you can easily convert date/time format cell to any kind of date format as you need.

Before applying Kutools for Excel, please download and install it firstly.

1. Select the date/time format cell you need to display only the date value, then click Kutools > Format > Apply Date Formatting. See screenshot:

2. In the Apply Date Formatting dialog box, select a date format in the Date formatting box, and then click the OK button.

Now the date/time format cells are displayed as date value only. See screenshot:

Note: Although the date/time format cells are shown as date only, the displayed values in the Formula Bar are still date/time format. If you want to convert the displayed values in the formula bar to their actual value, please select them and click Kutools > To Actual. See screenshot:

If you want to have a free trial ( 30-day) of this utility, please click to download it, and then go to apply the operation according above steps.

Dates are represented as the number of days since 1970-01-01, with negative values for earlier dates.

# use as.Date( ) to convert strings to dates

Sys.Date( ) returns today’s date.
date() returns the current date and time.

The following symbols can be used with the format( ) function to print dates.

Symbol Meaning Example
%d day as a number (0-31) 01-31
abbreviated weekday
unabbreviated weekday
%m month (00-12) 00-12
abbreviated month
unabbreviated month
2-digit year
4-digit year

Here is an example.

# print today’s date

Date Conversion

Character to Date

You can use the as.Date( ) function to convert character data to dates. The format is as.Date(x, “format”), where x is the character data and format gives the appropriate format.

# convert date info in format ‘mm/dd/yyyy’

The default format is yyyy-mm-dd

Date to Character

You can convert dates to character data using the as.Character( ) function.

# convert dates to character data

Learning More

See help(as.Date) and help(strftime) for details on converting character data to dates. See help(ISOdatetime) for more information about formatting date/times.

To Practice

This intermediate R course includes a section on working with times and dates.

1. General

How to say the year

You write You say
1900 nineteen hundred
1901 nineteen hundred (and) one
nineteen oh-one
1995 nineteen ninety-five
2000 two thousand
twenty hundred
2002 two thousand (and) two
twenty oh-two
2010 two thousand (and) ten
twenty ten

You normally split up the year in tens.

1985 is split up in 19 and 85. (You say: nineteen eighty-five).

From 2000 until 2009 the year is normally not split up.

  • 2000 = two thousand
  • 2001 = two thousand (and) one

The word and is often left out. From 2010 on the year is split up again.

2010 is split up in 20 and 10. (You say: twenty ten).

2. Writing and saying the date in British English

rule: day – month – year

Day Month Year
You write: 1st January, 2010
You say: the first of January twenty ten

Note: The two letters at the end of the number and the comma are often left out.

3. Writing and saying the date in American English

rule: month – day – year

Month Day Year
You write: January 1st, 2010
You say: January (the)* first twenty ten

* The definite article ›the‹ can be left out.

4. Sample sentences and the correct prepositions:

  • I was born in 1999. (Use in with the year.)
  • I was born in August. (Use in with the month.)
  • I was born on 12th May, 2000. (Use on in the complete date.)

5. Abbreviations BC, AD, BCE, CE

Sometimes BC or AD is added after the year.

  • 1060 BC (ten sixty Before Christ)
  • 1060 AD (ten sixty Anno Domini) – This is Latin for in the year of the Lord.

The abbrevations BCE or CE are becoming more and more common today.

  • 1060 BCE (ten sixty Before the Common/Current/Christian Era)
  • 1060 CE (ten sixty Common/Current/Christian Era)
  • 1060 BC = 1060 BCE
  • 1060 AD = 1060 CE

6. Note

It is common to use numbers instead of months.

British English

  • 13-11-2010
  • 13/11/2010
  • 13.11.2010

American English

  • 11-13-2010
  • 11/13/2010
  • 11.13.2010

If you write 4/8/2011, it is the 4th August 2011 in Britain, but it is April 8th, 2011 in the USA.

Python provides an in-built module datetime which allows easy manipulation and modification of date and time values. It allows arithmetic operations as well as formatting the output obtained from the DateTime module. The module contains various classes like date, time, timedelta, etc. that simulate the easy implementation of dates and time (month, years, and days).

Date and time objects are created using the DateTime module which is immutable and hashable. The following classes of the DateTime module are used to add days to a date in python :

Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.

To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course

  1. datetime – DateTime objects give date along with time in hours, minutes, seconds. The DateTime library provides manipulation to a combination of both date and time objects (month, day, year, seconds and microseconds).
  2. timedelta – Timedelta class represents the duration. The DateTime library provides timedelta method to carry out date-related manipulation and also calculate differences in time objects. It can be majorly used to perform arithmetic operations like addition, subtraction, and multiplication. By specifying the days attribute value, we can add days to the date specified.

Syntax: datetime.timedelta(days=0, seconds=0, microseconds=0, milliseconds=0, minutes=0, hours=0, weeks=0)

Example 1: The following Python code is used to add days to a date in Python

How to date

This page contains steps on how to change the computer’s date and time in the computer’s operating system, or in the BIOS settings. It also describes how to change the date and time on a mobile device.

If the date and time is resetting to an old date or the wrong time, the CMOS battery is bad and needs to be replaced. For help with CMOS battery issues, see: Why is computer asking for the time and date each time it boots?

If you are using Windows on a virtual machine, change the date and time on the host machine, not the virtual machine. The virtual machine gets the current date and time information from the host.

  • Setting date and time in BIOS or CMOS setup
  • Setting date and time in the operating system
    • Windows 10
    • Windows 8
    • Windows Vista and 7
    • Windows 9x, NT, 2000, and XP
    • MS-DOS and Windows command line
    • Linux
    • FreeBSD
    • Apple macOS

Setting the date and time in BIOS or CMOS setup

  1. Open the CMOS setup.
  • How to enter the BIOS or CMOS setup.
  1. In the system setup menu, locate the date and time.
  2. Using the arrow keys, navigate to the date or time, adjust them to your liking, and then select Save and Exit.

Steps may vary for your BIOS. For additional information, see: Computer BIOS help and support.

If, after rebooting the computer the date and time have to be set again, your CMOS battery is most likely bad, consider replacing the CMOS battery. See: How to replace the CMOS battery.

Setting date and time in the operating system

To change the system time in your operating system, follow these steps.

Windows 10

Windows 10 automatically adjusts your date and time for you and only allows you to adjust the time if you disable this feature. If the wrong date and time are set, or you need to change the time or time zone, follow the steps below.

  1. Right-click or tap the date and time in the Windows Notification Area in the bottom-right corner of the screen.
  2. Click Adjust date/time.
  3. Make sure your Time zone is set properly if your computer is displaying the wrong time.
  4. To manually adjust the time, turn off the Set time automatically option, then click the Change button.
  5. Change the date or time as desired, then click the Change button.

There is no ability to add seconds to the time displayed in the Windows Notification Area on the Taskbar. However, if you click the date and time, a pop-up window opens and displays the time with seconds included.

Windows 8

  1. Click or tap the date and time in the Windows Notification Area in the bottom-right corner of the screen.
  2. Select Change date and time settings at the bottom of the window that appears (shown below).

How to date

  1. In the Date and Time window, under the Date and Timetab, click the Change date and time button.
  2. Make your adjustments and click OK.
  3. Click OK on the main Date and Time window to save the changes.

There is no ability to add seconds to the time displayed in the Windows Notification Area on the Taskbar. However, if you click the date and time, a pop-up window opens and displays the time with seconds included.

To change the time zone, follow these steps.

  1. In the Date and Time window from above, under the Date and Time tab, click the Change time zone button.
  2. Select the new time zone in the Time zone drop-down field and click OK.
  3. Click OK on the main Date and Time window to save the time zone change.

Windows 7 and Vista

In Windows 7 and Windows Vista, follow these steps to adjust the date and time.

  1. Press Windows key + D or navigate to the Windows desktop.
  2. Click or tap the date and time in the Windows Notification Area in the bottom-right corner of the screen.
  3. Select Change date and time settings in the bottom of the window that appears (shown below).

How to date

  1. In the Date and Time window, under the Date and Timetab, click the Change date and time button.
  2. Make your adjustments and click OK.
  3. Click OK on the Date and Time window to save the changes.

There is no ability to add seconds to the time displayed in the Windows Notification Area on the Taskbar. However, if you click the date and time, a pop-up window opens and displays the time with seconds included.

To change the time zone, follow these steps.

  1. In the Date and Time window from above, under the Date and Time tab, click the Change time zone button.
  2. Select the new time zone in the Time zone drop-down field and click OK.
  3. Click OK on the main Date and Time window to save the time zone change.

Windows XP, 2000, 98, 95, NE, and NT 4

In Windows XP and earlier versions, follow these steps to set the date and time.

  1. Navigate to the Windows desktop.
  2. Right-click the time in your Systray, usually located at the bottom-right of your screen.
  3. Click the Adjust Date/Time menu item.
  4. This action opens the Date/Time Properties window, where you can adjust the date, time, and time zone.
  5. Once the proper date and time are set, click Apply, and then Ok.

You may also double-click the time to open the Date/Time Properties window.

If you want to change how the computer handles daylight savings, click the Time Zone tab and check or uncheck the Automatically adjust clock for daylight saving changes option.

  • How to view the date in Microsoft Windows.

How to date

MS-DOS and Windows command line

Setting the date through MS-DOS or the Windows command line is accomplished via use of the date command. See our date command page for further information.

Setting the time through MS-DOS or the Windows command line is accomplished via use of the time command. See our time command page for further information.

Linux command line

In Linux, use the date command to manually set the system date and time.

Or, to synchronize your system clock with a network time server, use ntpdate . For example, on Ubuntu or Debian:

Specify a network time server to the ntpdate command, for example .

To keep your system time synchronized regularly, install the ntp system service.

The service starts immediately, and starts automatically at system boot. To configure the service, edit the file /etc/ntp.conf , then restart the service.

To access the hardware clock directly, use the hwclock command.


In FreeBSD, ntp can be installed with the pkg package manager.

SQL Dates

The most difficult part when working with dates is to be sure that the format of the date you are trying to insert, matches the format of the date column in the database.

As long as your data contains only the date portion, your queries will work as expected. However, if a time portion is involved, it gets more complicated.

SQL Date Data Types

MySQL comes with the following data types for storing a date or a date/time value in the database:

  • DATE – format YYYY-MM-DD
  • YEAR – format YYYY or YY

SQL Server comes with the following data types for storing a date or a date/time value in the database:

  • DATE – format YYYY-MM-DD
  • TIMESTAMP – format: a unique number

Note: The date types are chosen for a column when you create a new table in your database!

SQL Working with Dates

Look at the following table:

Orders Table

OrderId ProductName OrderDate
1 Geitost 2008-11-11
2 Camembert Pierrot 2008-11-09
3 Mozzarella di Giovanni 2008-11-11
4 Mascarpone Fabioli 2008-10-29

Now we want to select the records with an OrderDate of “2008-11-11” from the table above.

We use the following SELECT statement:

The result-set will look like this:

OrderId ProductName OrderDate
1 Geitost 2008-11-11
3 Mozzarella di Giovanni 2008-11-11

Note: Two dates can easily be compared if there is no time component involved!

Now, assume that the “Orders” table looks like this (notice the added time-component in the “OrderDate” column):

OrderId ProductName OrderDate
1 Geitost 2008-11-11 13:23:44
2 Camembert Pierrot 2008-11-09 15:45:21
3 Mozzarella di Giovanni 2008-11-11 11:12:01
4 Mascarpone Fabioli 2008-10-29 14:56:59

If we use the same SELECT statement as above:

we will get no result! This is because the query is looking only for dates with no time portion.

Tip: To keep your queries simple and easy to maintain, do not use time-components in your dates, unless you have to!

Convert argument to datetime.

Parameters arg int, float, str, datetime, list, tuple, 1-d array, Series, DataFrame/dict-like

The object to convert to a datetime.

If ‘raise’, then invalid parsing will raise an exception.

If ‘coerce’, then invalid parsing will be set as NaT.

If ‘ignore’, then invalid parsing will return the input.

dayfirst bool, default False

Specify a date parse order if arg is str or its list-likes. If True, parses dates with the day first, eg 10/11/12 is parsed as 2012-11-10. Warning: dayfirst=True is not strict, but will prefer to parse with day first (this is a known bug, based on dateutil behavior).

yearfirst bool, default False

Specify a date parse order if arg is str or its list-likes.

If True parses dates with the year first, eg 10/11/12 is parsed as 2010-11-12.

If both dayfirst and yearfirst are True, yearfirst is preceded (same as dateutil).

Warning: yearfirst=True is not strict, but will prefer to parse with year first (this is a known bug, based on dateutil behavior).

utc bool, default None

Return UTC DatetimeIndex if True (converting any tz-aware datetime.datetime objects as well).

format str, default None

The strftime to parse time, eg “%d/%m/%Y”, note that “%f” will parse all the way up to nanoseconds. See strftime documentation for more information on choices:

exact bool, True by default

Behaves as: – If True, require an exact format match. – If False, allow the format to match anywhere in the target string.

unit str, default ‘ns’

The unit of the arg (D,s,ms,us,ns) denote the unit, which is an integer or float number. This will be based off the origin. Example, with unit=’ms’ and origin=’unix’ (the default), this would calculate the number of milliseconds to the unix epoch start.

infer_datetime_format bool, default False

If True and no format is given, attempt to infer the format of the datetime strings based on the first non-NaN element, and if it can be inferred, switch to a faster method of parsing them. In some cases this can increase the parsing speed by

origin scalar, default ‘unix’

Define the reference date. The numeric values would be parsed as number of units (defined by unit ) since this reference date.

If ‘unix’ (or POSIX) time; origin is set to 1970-01-01.

If ‘julian’, unit must be ‘D’, and origin is set to beginning of Julian Calendar. Julian day number 0 is assigned to the day starting at noon on January 1, 4713 BC.

If Timestamp convertible, origin is set to Timestamp identified by origin.

cache bool, default True

If True, use a cache of unique, converted dates to apply the datetime conversion. May produce significant speed-up when parsing duplicate date strings, especially ones with timezone offsets. The cache is only used when there are at least 50 values. The presence of out-of-bounds values will render the cache unusable and may slow down parsing.

Changed in version 0.25.0: – changed default value from False to True.

If parsing succeeded. Return type depends on input:

Series: Series of datetime64 dtype

In case when it is not possible to return designated types (e.g. when any element of input is before Timestamp.min or after Timestamp.max) return will have datetime.datetime type (or corresponding array/Series).

Cast argument to a specified dtype.

Convert argument to timedelta.

Assembling a datetime from multiple columns of a DataFrame. The keys can be common abbreviations like [‘year’, ‘month’, ‘day’, ‘minute’, ‘second’, ‘ms’, ‘us’, ‘ns’]) or plurals of the same

If a date does not meet the timestamp limitations, passing errors=’ignore’ will return the original input instead of raising any exception.

Passing errors=’coerce’ will force an out-of-bounds date to NaT, in addition to forcing non-dates (or non-parseable dates) to NaT.

Passing infer_datetime_format=True can often-times speedup a parsing if its not an ISO8601 format exactly, but in a regular format.

Let’s meet a new built-in object: Date. It stores the date, time and provides methods for date/time management.

For instance, we can use it to store creation/modification times, to measure time, or just to print out the current date.


To create a new Date object call new Date() with one of the following arguments:

Without arguments – create a Date object for the current date and time:

Create a Date object with the time equal to number of milliseconds (1/1000 of a second) passed after the Jan 1st of 1970 UTC+0.

An integer number representing the number of milliseconds that has passed since the beginning of 1970 is called a timestamp.

It’s a lightweight numeric representation of a date. We can always create a date from a timestamp using new Date(timestamp) and convert the existing Date object to a timestamp using the date.getTime() method (see below).

Dates before 01.01.1970 have negative timestamps, e.g.:

If there is a single argument, and it’s a string, then it is parsed automatically. The algorithm is the same as Date.parse uses, we’ll cover it later.

Create the date with the given components in the local time zone. Only the first two arguments are obligatory.

  • The year must have 4 digits: 2013 is okay, 98 is not.
  • The month count starts with 0 (Jan), up to 11 (Dec).
  • The date parameter is actually the day of month, if absent then 1 is assumed.
  • If hours/minutes/seconds/ms is absent, they are assumed to be equal 0 .

The maximal precision is 1 ms (1/1000 sec):

Access date components

There are methods to access the year, month and so on from the Date object:

getFullYear() Get the year (4 digits) getMonth() Get the month, from 0 to 11. getDate() Get the day of month, from 1 to 31, the name of the method does look a little bit strange. getHours(), getMinutes(), getSeconds(), getMilliseconds() Get the corresponding time components.

Many JavaScript engines implement a non-standard method getYear() . This method is deprecated. It returns 2-digit year sometimes. Please never use it. There is getFullYear() for the year.

Additionally, we can get a day of week:

getDay() Get the day of week, from 0 (Sunday) to 6 (Saturday). The first day is always Sunday, in some countries that’s not so, but can’t be changed.

All the methods above return the components relative to the local time zone.

There are also their UTC-counterparts, that return day, month, year and so on for the time zone UTC+0: getUTCFullYear(), getUTCMonth(), getUTCDay(). Just insert the “UTC” right after “get” .

If your local time zone is shifted relative to UTC, then the code below shows different hours:

Besides the given methods, there are two special ones that do not have a UTC-variant:

Returns the timestamp for the date – a number of milliseconds passed from the January 1st of 1970 UTC+0.

Returns the difference between UTC and the local time zone, in minutes:

Setting date components

The following methods allow to set date/time components:

Every one of them except setTime() has a UTC-variant, for instance: setUTCHours() .

As we can see, some methods can set multiple components at once, for example setHours . The components that are not mentioned are not modified.


The autocorrection is a very handy feature of Date objects. We can set out-of-range values, and it will auto-adjust itself.

Out-of-range date components are distributed automatically.

Let’s say we need to increase the date “28 Feb 2016” by 2 days. It may be “2 Mar” or “1 Mar” in case of a leap-year. We don’t need to think about it. Just add 2 days. The Date object will do the rest:

That feature is often used to get the date after the given period of time. For instance, let’s get the date for “70 seconds after now”:

We can also set zero or even negative values. For example:

Date to number, date diff

When a Date object is converted to number, it becomes the timestamp same as date.getTime() :

The important side effect: dates can be subtracted, the result is their difference in ms.

That can be used for time measurements:

If we only want to measure time, we don’t need the Date object.

There’s a special method that returns the current timestamp.

It is semantically equivalent to new Date().getTime() , but it doesn’t create an intermediate Date object. So it’s faster and doesn’t put pressure on garbage collection.

It is used mostly for convenience or when performance matters, like in games in JavaScript or other specialized applications.

So this is probably better:


If we want a reliable benchmark of CPU-hungry function, we should be careful.

For instance, let’s measure two functions that calculate the difference between two dates: which one is faster?

Such performance measurements are often called “benchmarks”.

These two do exactly the same thing, but one of them uses an explicit date.getTime() to get the date in ms, and the other one relies on a date-to-number transform. Their result is always the same.

So, which one is faster?

The first idea may be to run them many times in a row and measure the time difference. For our case, functions are very simple, so we have to do it at least 100000 times.

Wow! Using getTime() is so much faster! That’s because there’s no type conversion, it is much easier for engines to optimize.

Okay, we have something. But that’s not a good benchmark yet.

Imagine that at the time of running bench(diffSubtract) CPU was doing something in parallel, and it was taking resources. And by the time of running bench(diffGetTime) that work has finished.

A pretty real scenario for a modern multi-process OS.

As a result, the first benchmark will have less CPU resources than the second. That may lead to wrong results.

For more reliable benchmarking, the whole pack of benchmarks should be rerun multiple times.

For example, like this:

Modern JavaScript engines start applying advanced optimizations only to “hot code” that executes many times (no need to optimize rarely executed things). So, in the example above, first executions are not well-optimized. We may want to add a heat-up run:

Modern JavaScript engines perform many optimizations. They may tweak results of “artificial tests” compared to “normal usage”, especially when we benchmark something very small, such as how an operator works, or a built-in function. So if you seriously want to understand performance, then please study how the JavaScript engine works. And then you probably won’t need microbenchmarks at all.

The great pack of articles about V8 can be found at

Date.parse from a string

The method Date.parse(str) can read a date from a string.

The string format should be: YYYY-MM-DDTHH:mm:ss.sssZ , where:

  • YYYY-MM-DD – is the date: year-month-day.
  • The character “T” is used as the delimiter.
  • HH:mm:ss.sss – is the time: hours, minutes, seconds and milliseconds.
  • The optional ‘Z’ part denotes the time zone in the format +-hh:mm . A single letter Z would mean UTC+0.

Shorter variants are also possible, like YYYY-MM-DD or YYYY-MM or even YYYY .

When building APIs, it is pretty common to use JSON as a serialization format. JSON defines serialization for boolean, number and string, but not for date/datetime values.

What most serializers do with Date and DateTime values is to use the ISO8601 standard. For example:

However, you should be aware that information is lost when you use the Date format. That happens because a Date value might differ between different timezones. Let me give you an example:

  • a request was issued at 2011-07-14 T01:00:00Z (UTC) from Brazil (UTC-0300) to a service in UTC
  • if the time the request was created is exposed as a Date, it would return the value as 2011-07-14
  • but from the client’s perspective in Brazil, the correct date is 2011-07-13 , since at the moment of that request was issued, the local time in Brazil was 2011-07-13 T22:00:00-0300

If this information is used only inside your app, within the same timezone, you would have no problems. But, if you need to make this information available through a public API, one of your API’s consumers might recover an incorrect value.

So, from this experience, any date value that will be shared and consumed by different clients should be represented as date time with explicit timezone or using the Unix time format. That way, it is up to the client to treat the data properly.

Here is an example of an API that returns a subscription period in the right way:

The options above have the advantage that both are unambiguous and sortable. You may choose between one or another based on the fact that the timezone option is easier for human comprehension. But remember that Timezones are a presentation-layer problem, so if you just need to pass data around, Unix time is preferable.

Have you ever had this serialization problem or any other that caused information to be lost? If you have questions or any experience to share, please, leave a comment below.

How to Insert a Date in MySQL

Using a database is mandatory for the creation of a dynamic modern website. MySQL has been established as a preferred database platform due to the indisputable qualities of this database server. Specifying the dates on which the content is entered is of prime importance for the structuring and the chronological arrangement of articles, posts and replies in a dynamic website. MySQL comes with several data types for storing dates in its database system: DATE, TIMESTAMP, DATETIME and YEAR.

How to use the DATE statement

The default way to store a date in a MySQL database is by using DATE. The proper format of a DATE is: YYYY-MM-DD. If you try to enter a date in a format other than the Year-Month-Day format, it might work but it won’t be storing the dates as you expect.

In order to run a MySQL Insert command and add the current date into your table you can use MySQL’s built-in function CURDATE() in your query.

An example of how to Insert a Date in MySQL using CURDATE

Also, you can run a query to set the date manually

An example of how to Insert a Date in MySQL manually

All these queries can be run by using a command line, a script (written in PHP, Perl, Python etc.), or via the PHPMyAdmin interface inserted in NTC Hosting’s sophisticated Web Hosting Control Panel.

Also, there is a statement that allows you to set only the YEAR of an event. The Year statement uses an YYYY format and has a range from 1901 to 2155 (for years outside this range you need to use the DATE statement)

Insert a date in MySQL using YEAR

Now let’s check how the YEAR statement works in a query. For our example we will use CURDATE() again. As we mentioned above, CURDATE() provides a lot more information than just the year, but when we use the YEAR statement all the date information, besides the year, is ignored.

An example of how to Insert a YEAR in MySQL using CURDATE

Set a date in MySQL using DATETIME

Using DATETIME you can store both the date and the time. Its format is YYYY-MM-DD HH:mm:SS. Using this statement you can store the output for both DATE and TIME statements. Also, you can choose to store the date information only, but you can’t store just the time.

An example of how to use DATETIME

How to insert a date in PHPMyAdmin

As we mentioned above, there are several ways to store a date. One of the easiest methods is by using a database management tool such as PHPMyAdmin. With its graphical user interface and set of built-in features, PHPMyAdmin makes the database management an easy job. That’s why we, at NTC Hosting, have chosen the PHPMyAdmin web management tool and are providing it with all our web hosting plans.

To add a date information in PHPMyAdmin you need to log in the PHPMyAdmin interface and then to enter the ‘Insert’ tab. Then you can choose the appropriate Insert functions for each field using the drop-down list in the functions column.

How to date

If you want to learn more on how to use the insert function in PHPMyAdmin, please visit the MySQL Insert and PHPMyAdmin articles.

Setting a date in MySQL using a PHP script

Using a PHP script for setting a date in MySQL is very common. To use this method, run an SQL query in a PHP script. This method is used every day by some very simple PHP scripts and by large modern PHP-based applications. Let’s take a look at how it looks like:

An example of a PHP script which sets a date in MySQL manually

Also, there is an option to set the date automatically:

An example of a PHP script which sets a date in MySQL manually

As you can assume, you can use not only DATE, but also YEAR and DATETIME statements in PHP – the syntax is similar.

Use international date format (ISO)

How does one write a date on the Web? There are so many formats available, most of them incompatible with others, that it can be a usability nightmare to choose a date representation when writing for an international, cross-cultural audience, as is the case on the web. Fortunately, there is one solution in the ISO-developed international date format.

The date interpretation quagmire

The worst potential usability problems come when the date is written only with numbers as in the following example, because the date’s interpretation will be different from one country to another.

Imagine the following date: 02/04/03

Which does it mean?

  • 2nd of April 2003 (European style)
  • 4th of February 2003 (USA style)
  • 3rd of April 2002

Your answer will depend, mostly, on which country you live in.

In most cases, writing the date in full letters would be better than the example above. Apr. 3rd, 2002 , for example will be easy to understand for any English-speaking audience.

But this system does not cross borders much better than its numerical counterparts: does the french 12 Août 2042 actually mean something for a Japanese person? Or when you notice a 昭和44年03月16日 in Japanese which is 16 March 1969 in English.

The ISO date format

The international format defined by ISO (ISO 8601) tries to address all these problems by defining a numerical date system as follows: YYYY – MM – DD where

  • YYYY is the year [all the digits, i.e. 2012]
  • MM is the month [01 (January) to 12 (December)]
  • DD is the day [01 to 31]

For example, “3rd of April 2002”, in this international format is written: 2002-04-03 .

Note that this format can also be used to represent precise date and time, with timezone information

Using numerical dates does have also some pitfalls with regard to readability and usability, as explained in the Date formats FAQ . Albeit not perfect, ISO date format is, however, the best choice for a date representation that is universally (and accurately) understandable.

Further Reading

  • Date and Time Formats
  • ISO 8601 Date and time format
  • Everything on Calendar systems
  • W3C Q&A : Date formats

About the “QA Tips”

The W3C QA Tips are short documents explaining useful bits of knowledge for Web developers or designers, hosted and produced by the Quality Assurance Interest Group at W3C.

While the tips are carefully reviewed by the participants of the group, they should not be seen as anything else than informative bits of wisdom, and especially, they are not normative W3C technical specifications.

Learn more about the Tips, how to submit your own pearls of wisdom, and find all the other QA tips in the Tips Index.

Most collectors of early electronic calculators will sooner or later ask themselves: „How old is this piece of history in my hands“? The answer is quiet easy, in conjunction with the pictured albums here in the Datamath Calculator Museum you get a rough estimate of the timeframe each calculator was built. Some models had a very short lifetime, e.g. the rare SR-16 was manufactured between October 1974 and early 1975. Other calculators stayed longer, the famous TI-68 was introduced 1991 and was available in some countries till the year 2000. If you inspect the calculators manufactured by Texas Instruments carefully you will notice small numbers stamped with ink on the body shell, embossed in the plastic mold or printed on the license plate. These numbers look typically like 314, 2676 ATA or I1090. If you study this article carefully you’ll learn that the first calculator is a Datamath Version 2 manufactured April, 1973, the second calculator was produced in the Abilene, TX facility and the third is a modern, Taiwanese LCD calculator. Interested in getting more information?

• Search the numbers

Starting with the introduction of both the Datamath and the early Desktop calculators Texas Instruments used visible ink to stamp the manufacturing date on the back of the calculator housing using a 3-digit code. Unfortunately in most cases the ink got lost over the time on the polished surfaces of the early calculators. Later models like the TI-2550 or Exactra line used a structured surface and the ink is more durable. Some calculators like the SR-50 got the date code printed on hidden places like the internal plastic frame below the battery pack. If you can read only parts of the numbers you should open the calculator and search the manufacturing date on the integrated circuits to limit the possible date range. Calculators introduced in the year 1976 or later use another coding with 4-digits embossed into the mold of the rear case shell. This method was durable, in some cases the readability is limited due to bad adjusted temperature or pressure of the tooling. With the TI-1750, the first Texas Instruments calculator produced in Japan another coding scheme using 3-digits was introduced. These early LCD-calculators with their metal housing got small adhesive license plates carrying the model designation, serial number, date and origin of manufacturing. Later far East products use a novel 4-digit coding for the date of manufacturing.

• Decipher the code

You should be able to decipher 5 different coding schemes of the manufacturing date to cover all calculators and related products manufactured by Texas Instruments. In addition you get in most cases the information of the place of manufacturing.

3-digit date code

Early calculators introduced between the years 1972 and 1975 make use of a three digit code to define the week and year of manufacturing.

Example: 314 reads as 31 th week of the year 197 4

You notice immediately that this code was not Y2K compliant and there was a need for another coding scheme.

The origin of the calculator is usually Dallas, TX if not otherwise noted. Only the TI-2500 / TI-3500 was reported to be produced in Italy, UK and Spain and the SR-10 / SR-11 in Brazil and Spain.

3-digit “Early Far East” date code

Calculators produced in Far East and Souteast Asia during the late 70s and early 80s use a three digit code to define the month and last digit of the year of manufacturing

Example: 104 reads as October 198 4

T he manufacturer of the calculator is coded with one letter and the origin written in plain words. A table is given with the 4-digit “far East” code.

4-digit date code

Calculators introduced later than 1975 and not produced in Asia use a four digit code to define the week and year of manufacturing.

Example: 2676 reads as 26 th week of the year 19 76

The origin of the calculator is coded with three letters and / or written in plain words.

4-digit “Far East” date code

Calculators produced in Far East and Southeast Asia use a four digit code to define the month and year of manufacturing.

Example: 1090 reads as October 19 90

The manufacturer of the calculator is coded with one letter and the origin written in plain words.

Code Maunfacturer Origin Logo
A unknown China
C Cal-Comp Taiwan, Thailand
C Compal Taiwan, China
G Kinpo China
I Inventec Taiwan, Malaysia
K Kinpo Taiwan
L Kinpo Philippines
L Leo Electronics Japan, China
M Inventec Penang Malaysia
N Nam Tai China
O unknown Thailand
P Inventec Pudong China
S Inventec Shanghai China
T Toshiba Japan
Z Zeny Taiwan, China

6-digit “European” date code

Calculators produced in Italy use sometimes a six digit code giving the day of production.

Example: RCI 240595 reads as May 24, 19 95

3-digit “European” date code

Both the Financial Investment Analyst and Fixed Income Securities calculators manufactured between 1988 and 1991 in Italy use a three digit code to define the week and year of manufacturing.

Example: 439 reads as 43 th week 198 9

The years 199 0 and 199 1 are encoded with the digit 0 resp. 1 .

Returns a date either as a string or as a Date object.

  • Date() returns the current date as a string in mongosh .
  • new Date() returns the current date as a Date object. mongosh wraps the Date object with the ISODate helper. The ISODate is in UTC.

You can specify a particular date by passing an ISO-8601 date string with a year within the inclusive range 0 through 9999 to the new Date() constructor or the ISODate() function. These functions accept the following formats:

  • new Date(” “) returns the ISODate with the specified date.
  • new Date(” “) specifies the datetime in the client’s local timezone and returns the ISODate with the specified datetime in UTC.
  • new Date(” “) specifies the datetime in UTC and returns the ISODate with the specified datetime in UTC.
  • new Date( ) specifies the datetime as milliseconds since the UNIX epoch (Jan 1, 1970), and returns the resulting ISODate instance.


Internally, Date objects are stored as a signed 64-bit integer representing the number of milliseconds since the Unix epoch (Jan 1, 1970).

Not all database operations and drivers support the full 64-bit range. You may safely work with dates with years within the inclusive range 0 through 9999 .


Use Date in a Query¶

If no document with _id equal to 1 exists in the products collection, the following operation inserts a document with the field dateAdded set to the current date:

The static method returns the number of milliseconds elapsed since January 1, 1970 00:00:00 UTC.


Return value

A Number representing the milliseconds elapsed since the UNIX epoch.


Reduced time precision

To offer protection against timing attacks and fingerprinting, the precision of might get rounded depending on browser settings. In Firefox, the privacy.reduceTimerPrecision preference is enabled by default and defaults to 20µs in Firefox 59; in 60 it will be 2ms.

In Firefox, you can also enable privacy.resistFingerprinting , the precision will be 100ms or the value of privacy.resistFingerprinting.reduceTimerPrecision.microseconds , whichever is larger.


ECMAScript Language Specification (ECMAScript)

Browser compatibility

BCD tables only load in the browser

See also

  • A polyfill of is available in core-js
  • — provides timestamps with sub-millisecond resolution for use in measuring web page performance
  • console.time() / console.timeEnd()

Found a problem with this page?

  • Edit on GitHub
  • Source on GitHub
  • Report a problem with this content on GitHub
  • Want to fix the problem yourself? See our Contribution guide.

Last modified: Oct 7, 2021 , by MDN contributors

  • Web Technologies
  • Learn Web Development
  • About MDN
  • Feedback
  • About
  • MDN Web Docs Store
  • Contact Us
  • Firefox
  • MDN on Twitter
  • MDN on Github


  • Mozilla on Twitter
  • Mozilla on Instagram

© 2005- 2021 Mozilla and individual contributors. Content is available under these licenses.

Benj Edwards is an Associate Editor for How-To Geek. For over 15 years, he has written about technology and tech history for sites such as The Atlantic, Fast Company, PCMag, PCWorld, Macworld, Ars Technica, and Wired. In 2005, he created Vintage Computing and Gaming, a blog devoted to tech history. He also created The Culture of Tech podcast and regularly contributes to the Retronauts retrogaming podcast. Read more.

How to date

When using a PC with Windows 11, it’s important to keep your operating system updated. Updates fix bugs, add new features, and protect you from malware by patching security vulnerabilities. Here’s how to keep Windows 11 up-to-date.

First, a Quick Way to Update

Windows 11 regularly checks for updates automatically in the background. When a major update becomes available, you’ll see a small Windows Update icon (which looks like two curved arrows in a circular shape) in the lower right corner of your taskbar. It will appear near the clock.

How to date

Usually, this icon only appears if the update as already been downloaded and is ready to install. Click this icon, and Windows Update will open in Settings. From there, click “Restart Now,” and the update installation process will begin.

How to date

After restarting, Windows 11 will apply the updates, then startup as usual. Once you login again, you’re good to go. If you’d like to check for more updates, open Settings and navigate to “Windows Update,” then follow the instructions below.

How to Check for Windows 11 Updates in Settings

If you want to check for updates (or make sure you’re completely up-to-date), it’s good to check in Windows Settings. To do so, first open Settings by pressing Windows+i on your keyboard. Or you can right-click the Start button and select “Settings” from the list.

How to date

In Settings, choose “Windows Update” in the sidebar.

How to date

In Windows Update settings, click the “Check for Updates” button.

How to date

If your Windows 11 installation is fully up-to-date, you’ll see a message that says “You’re up to date” on the Windows Update screen in Settings. If that’s the case, you can close Settings safely and keep using your PC as usual.

If there are updates available, Windows Update will say “Updates available,” then list the available updates below. Click the “Download Now” to begin downloading the updates to your PC.

How to date

After an update has been downloaded, sometimes Windows 11 can install it without restarting. If that’s the case, then click “Install Now” to install the update or updates.

How to date

If it’s a major update, a restart might be required. If so, click “Restart Now,” and Windows 11 will close all apps, then restart and apply the updates. When it’s done, log in again, and you’re ready to use your PC as usual. Good luck!


When working with date and time values (ie. DateTime values) in flow, they may look like:

You may format these values to look like:

Monday, June 15, 2009

This is done through the use of Date and Time Format Strings passed to the formatDateTime () function.

Format Strings

A standard format string is a single character (ex. ‘d’, ‘g’, ‘G’, this is case-sensitive) that corresponds to a specific pattern.

For example the format string ‘g’ corresponds to the General date/time pattern (short time):

(‘2009-06-15T13:45:30’, ‘g’) -> 6/15/2009 1:45 PM

A custom format string is any string with more than one character (ex. ‘M/dd/yyyy h:mm tt’) that can control the visibility, positioning, precision of the month, day, hour, second etc. of the DateTime value.

For example the format string ‘M/dd/yyyy h:mm tt’ represents the same pattern as the standard format string ‘g’ as described above:

(‘2009-06-15T13:45:30’, ‘M/dd/yyyy h:mm tt’) -> 6/15/2009 1:45 PM

See belowfor more information about available standard format patterns and how to construct a custom format string.

Example Steps

Select the input field where you want the formatted DateTime value

Go to the expression editor (‘Add dynamic content’ -> click on ‘Expression’ tab)

Type formatDateTime() (or look under ‘Date and time’ functions)

Provide the value (can be dynamic content) to be formatted (surrounded by single quotes)

Provide the format string (surrounded by single quotes)

The full expression should look like:
formatDateTime (‘ ‘, ‘dd/MM/yyyy hh:mm tt’)

Home » DevOps and Development » How to Get the Current Date and Time in Python

Python is a versatile programming language used to develop desktop and web applications. It allows you to work on complex projects.

Learn how to get current date and time in the python script with multiple options.

How to date

  • Command line / terminal window access
  • User account with root or sudo privileges
  • Python installed
  • Prefered text editor (in this case nano )

Get Current Date Time in Python with datetime Module

Use the command line to create and access a new file:

The system will tell you the file does not exist and ask you to create it. Click Yes and add the following in your text editor:

Save the file, then exit. Run the file by entering:

The result will show today’s date using the datetime module:

Options for datetime formating

Python has a number of options to configure the way date and time are formated.

Create a sample file:

Edit the file as follows:

Save the file and exit. Run the file by entering:

The system displays the date and time, the date, and the time on three separate lines.

Use strftime() to display Time and Date

The strftime() method returns a string displaying date and time using date, time or datetime object.

Enter the following command in your terminal window:

You have created a new file named Use this file to define the format of the information the system is to display.

To display the time in 24-hour format, enter:

This example image shows the file when using nano on a Debian distribution :

How to date

Save and close the file.

Execute the script by typing:

The result displays the time in the requested format:

To display the time in a 12-hour format, edit the file to:

Save and close the file.

Execute the script by typing:

Additional Options Using strftime

The strftime method accepts several formatting options.

First, create a new sample file:

Edit the file as follows:

Save the file and exit.

Run the file by typing:

An example of the result in Debian is below:

The strftime method has many formatting options. All the available options are in the official documentation.

This guide has shown you how to use Python to display the date and time. Python is pretty straightforward and offers multiple options (%X values) to show the date and time in different formats.

You now understand some basic concepts and can attempt to create more complex scripts.

How to date

How to date

Excel VBA String to Date

In Vba there is a method through which we can convert a given string to a date, and the method is known as CDATE function in vba, this is an inbuilt function in VBA and the parts required for this function is to first convert the string to a number and then we convert the given number to a date. The result format depends on system date format only.

One of the common problems we all face with excel is “Date & Time” and are often stored as text values and go unnoticed initially. But when they are required to use that time, we will get to know that those values are stored as text and don’t know how to deal with them at all. “Date & Time” are two combined things in one element, but once those values are stored as text values, it is a pain to work with.

How to date

You are free to use this image on your website, templates etc, Please provide us with an attribution link How to Provide Attribution? Article Link to be Hyperlinked
For eg:
Source: VBA String to Date (

How to Convert String Values to Date?

Example #1


In the above code, variable “k” is defined as the “String” data type, and for this variable, we have assigned the value as “10-21”.

How to date

We got the value as 10-21 only, but usually, these values are a date, not string values. So even though the data type assigned is “String,” we can still convert to date by using the data type conversion function CDATE VBA CDATE VBA The VBA CDATE Function converts a variable (text or string) to the date data type. VBA displays the run-time 13 error if it is unable to convert a value to Date & Time. read more .


In the above, before we show the result of the variable “k” in the message box, we have assigned the CDATE function. A small adjustment is made, let’s see how big an impact it makes.

How to date

Now we would see the result as “Date” no longer as “String” value.

Example #2

Now, look at the below code for an example.


At this point in time above code would show the result as “43599,” as we assigned above.

How to date

But once we use the CDATE function, it will convert to date value.


The result after applying the CDATE function is as follows.

How to date

Since excel stored the date as serial numbers, our assigned serial number 43599 is equal to the date 05/14/2019 when the date format is applied.

We can also apply the format to the date as “DD-MMM-YYYY” to read the date accurately.


In the above, I have declared one extra variable to store the result. For this variable, I have applied the CDATE conversion function.

Next, I have used the FORMAT function to apply the format of the “DD-MMM-YYYY” format, and the result will be as shown below.

How to date

With this, we can clearly read the daypart and month part. It also depends on your system date format in excel Date Format In Excel The date format in Excel can be changed either from the “number format” of the Home tab or the “format cells” option of the context menu. read more . Since my system date format was “MM-DD-YYYY,” it was showing like that, but that should not be a hindrance to format.

Example #3

Now we will see actually how dates are formatted as text values in worksheet cells. Below is the image of the dates stored as text in a worksheet.

How to date

In column A from A2 to A12, we have date looking values, but when we look at the format tab, it shows “Text” format. Now we need to convert these values from text to date.

Below is the code I have written to convert the text-formatted date values to actual dates.


If you run the code, it will give us the below result.

How to date

Things to Remember

  • CDATE is a data type conversion function but can be used to convert VBA stringVBA StringString functions in VBA do not replace the string; instead, this function creates a new string. There are numerous string functions in VBA, all of which are classified as string or text more stored date to actual date values.
  • The result of the CDATE function format depends on system date format only.
  • Dates are stored as serial numbers in excel, so formatting is required to show them as dates.

Recommended Articles

This has been a guide to VBA String to Date. Here we discuss how to convert date store in string values to date format in excel VBA using the CDATE function along with examples. You can learn more about VBA functions from the following articles –

All the secrets you want to know about a married woman.

  • Single Married Woman
    • How to Find a Single Married Woman
    • Little Known Ways to Please a Muscle Woman
    • Here are Some Great Married Woman Gift Ideas
  • Married Woman Secrets
    • Married Couple Secrets You Never Knew
    • The Inside Secret to a Happy Married Life
    • What Everybody Ought To Know About Getting Married
    • You Can Get Rid of a Married Wife Once and For All
  • Why Married Women Date Online?
    • Why Do Women Get Married?
    • Why Do Married Women Cheat?
    • Married Women Looking For Men
    • What Do Men Look For In Married Women?
    • Why Married Women Should Date Online
  • In Love With A Married Woman
    • Why Am I in Love with a Married Woman
    • What to do if you’re in Love with a Woman to Be Married
    • Looking for a Satisfying Relationship? Imagine Being with a Young Married Woman

For many men, there is just something about a married woman that is more attractive than anything else. Maybe it’s the way that so many of them seem to convey a sense of self esteem or confidence in themselves and their situation. It’s the woman who’s not afraid to offer a passionate kiss, even though she’s just taken a bite of garlicky pasta. It’s the woman who has enough confidence in who she is that a slightly dimpled bottom is not the end of the world. It’s the fact that many married women know how to please themselves and the man that they are with.

How to dateFor lots of guys, this is just what they want and need. If you’re one of the many guys out there that wants to know how to date a married woman, then you likely know that you’re not in it for a long term commitment. You probably also know that it can be hard to actually meet a married woman to date. There are some tricks that you can see just how easy it is to date a married woman.

For instance, you have to know how to tell that the women you’re meeting really want to start a thing with you. It will be easier to date a married woman when you meet one that wants to have an affair. If the woman you meet is interested in dating you, then she’ll be open to talking to you. She might even hit on you a little bit. This is a good sign that you’ve met a married woman that wants to date you.

The next step is to see if you can get her number or if she’ll take your number. You might even see her thinking through how she can talk to you and get away with it. If she only wants to take your number, let her. She might not call, but then again she probably will. With married women, you have to remember that it’s not like dating a woman who is single. There will be stolen moments at odd times and you’re likely going to have to deal with them, but if you’re willing to you’ll probably find that it’s quite easy to date a married woman.

Most of the time, once the initial date has taken place, if she likes you, she’ll be the one making arrangements and planning your next get together, which is why it’s really easy to date a married woman. Plus, if you aren’t the type for a serious commitment, then this might be the best thing for you. You get to be with a woman who you enjoy and really connect with when she can and when her husband is home, you’re free to do all the guy things you usually do.

If you would like to see how easy it really is to date a married woman, then it might be time to make the first move. You can meet them all over the place and often, if they are out without their husbands it’s pretty likely that they are looking for someone just like you. In fact, if you just give many married women a little nudge, you’ll find that it’s incredibly easy to date the married woman you seek.