Skip to Content
author's profile photo Former Member
Former Member

DayName () function is not working...please help...

I have 2 sets of string:

[YYYYMM] and [DD].

I need to combine these 2 strings to make a date, and return the week day.

I am doing the following but it is not working.

It says it is invalid data type.

Can anyone please help me?

***************************************************************

Step 1. Convert [YYYYMM] to Date

Variable 1=FormatDate(ToDate([YYYYMM];"yyyyMM");"yyyy/MM")

Step 2. Convert [DD] to Date

Variable 2 =FormatDate(ToDate([DD];"dd");"/dd")

Step 3. Combine 2 variables to create date in the format of (yyyy/MM/dd)

Variable 3 =Variable 1 + Variable 2

Step 4. Return DayName

=DayName([Variable 3])

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Apr 24, 2016 at 09:45 AM

    Hi,

    You just need to write the following formula:

    Variable X = DayName(ToDate([YYYYMM]+[DD];"yyyyMMdd"))


    Didier

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.