cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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])

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You just need to write the following formula:

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


Didier

Former Member
0 Kudos

Wow thank you so much...

Answers (0)