Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8766865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T16:39:20+00:00 2026-06-13T16:39:20+00:00

I am querying my DB to make an output that will specify the shipping

  • 0

I am querying my DB to make an output that will specify the shipping deadlines for each order. To do this I would like to do a query on a past weeks orders having a column for the date/time of the order. However, I would also like to automatically create another column called “Shipping Deadline” which calculates the date/time 24 hours after the order was made. Like follows;

    Order ID  |  Payment Amount   |   Order Date               |    Shipping Deadline 
    1001         $500                 10/15/2012 10:01:00 AM        10/17/2012 10:01:00 AM
    1002         $200                 10/16/2012 7:37:00 AM         10/18/2012 7:37:00 AM

Is there an easy way do create the Shipping Deadline column in SQL? This is what I have got up to now.

SELECT OrderDate AS 'Order Date', OrderID AS 'Order ID', PaymentAmount AS 'Payment Amount', TotalShippingCost AS 'Total Shipping Cost'
FROM Orders
WHERE OrderDate BETWEEN '10/15/2012 00:00:00' and '10/21/2012 00:00:00'

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T16:39:22+00:00Added an answer on June 13, 2026 at 4:39 pm

    You say 24 hours but the example shows 48 hours?

    SELECT OrderDate AS [Order Date],
           OrderID AS [Order ID],
           PaymentAmount AS [Payment Amount],
           TotalShippingCost AS [Total Shipping Cost],
           DateAdd(hour, 48, OrderDate) [Shipping Deadline]
      FROM Orders
     WHERE OrderDate BETWEEN '10/15/2012 00:00:00' and '10/21/2012 00:00:00'
    

    By the way, don’t use single-quotes for column aliases in future; use the square brackets as shown above.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First up: we are not doing TPH (table per hierarchy), that would make this
i'm querying a database like this: SELECT * from Log WHERE cookieId IN (select
My goal is to make a flash/as3 program that would pull multiple sets of
i have an application where i order make a query to my database with
This query works.. for querying 50 mysql databases at once and returning the most
Querying a Nested Set Model table , here's the SQL... how can this be
I'm querying the database for a single record that matches the id passed in
I'm querying an MFC implemented COM object that is implemented as follows: class CA
Basically I'm querying a table like the following keywordId | keyword 1 abc 1
I am trying to parse some xml with saxon to make some xpath querying

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.