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 8837251
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T09:40:36+00:00 2026-06-14T09:40:36+00:00

I have a parameter called pmday which I want to, when it is enetered,

  • 0

I have a parameter called pmday which I want to, when it is enetered, check if the day is on a saturday or sunday, and, if so, show the monday after.

I am relatively new to mySQL and I am running a SELECT statement to use pmday in other ways. Can I create a column which will show the monday after, only if the day falls on a weekend?

Here is an example of what I have been trying (and failing) to do. Im not sure if this is just a problem of me not knowing how, functions within select statements not being allowed, or general formatting and use of commas.

Thank you!

SELECT
    pmday AS EnteredDate,
    IF DateFormat(pmday, '%W') = 'Saturday' then
         Date_Add('pmday', INTERVAL 2 DAY) AS FollowingMonday
    Else If  DateFormat(pmday, '%W') = 'Sunday'  then
         Date_Add('pmday', INTERVAL 1 DAY) AS FollowingMonday
    END IF;
  • 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-14T09:40:38+00:00Added an answer on June 14, 2026 at 9:40 am
    SELECT
        pmday AS EnteredDate,
        CASE Date_Format(pmday, '%W')
            WHEN 'Saturday' THEN Date_Add(pmday, INTERVAL 2 DAY)
            WHEN 'Sunday' THEN Date_Add(pmday, INTERVAL 1 DAY)
            ELSE pmday
        END AS FollowingMonday
    ;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm pretty new to crystal. I have a parameter called {?names} which allows multiple
In my application I have a string parameter called shop that is required in
I have a DataGridView and handle event CellFormatting. It has a parameter called: DataGridViewCellFormattingEventArgs
I have a stored procedure, which returns the unique identifier after insertion @@identity .
I have an object with a string-typed parameter called ' baan_cat_fam_code '. The code
I have a Report Parameter called jndiURL (I've tried other names, the same problem
I am writing a stored procedure where I have an input parameter called my_size
I have a stored procedure that has a parameter called UserName and in my
Say I have a web application that accepts a parameter called content. Whatever is
I have a parameter called VoucherType that can multiple values selected by the user

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.