2

I need to name a column in a table and I'm wondering what the best option is.

Should it be "Published at + date + time" or "Published on"?

I only need to store a full date and time.

From some search I did, it seems that published at is used when referencing a date in the future while published on is used to reference a full date in the past, however it doesn't seem to be universal.

Any advice?

3 Answers 3

11

I would use on for a date:

This was published on July 4, 2007.

and I would use at for a time:

That was published at 1:30 PM.

So, for a column that has a date and time, either preposition would sound both fitting and awkward at the same time, at least to my ears.

Why not simply name the column Published, sans a preposition? If you don't like that idea, you could use When Published.

3
  • And then of course there's timestamp.
    – RegDwigнt
    Aug 17, 2012 at 9:27
  • What if it's for a year only? Is it correct to write "This was published in 2007"? Dec 1, 2012 at 11:58
  • @galacticninja: Correct. Use in for years. You can also use in for a month without a specified date as well: This was published in November 2003.
    – J.R.
    Dec 1, 2012 at 12:27
2

It's been customary to name columns in passive voice, e.g. Publishing date/time. That way no matter what values in your data, the column name will be correct.

2
  • This is actually either active voice or (in my view) a gerund. But good advice nevertheless. Aug 17, 2012 at 10:13
  • Sorry. Noun phrase is what I meant.
    – Chris
    Aug 17, 2012 at 11:40
1

Based on my understanding, on seems to be the widely accepted preposition for dates. However, just to expand on @J.R.'s suggestion, I would use neither of them in a database column and go with the following alternatives:

Date Published(date_published)

Or if you want to follow Wordpress's naming style, then use the following:

If the table name is comment, name the column comment date(comment_date).

Not the answer you're looking for? Browse other questions tagged or ask your own question.