How to use today’s date while using STUDIOX (시스템날짜 읽는법)

Using STUDIOX, I want to copy only the rows after today’s date from the Excel table shown below and then copy them to a new Excel file.

(STUDIOX 를 이용하여, 하기와 같은 엑셀 표에서 오늘 날짜 이후 행만 복사 후 새로운 엑셀 파일에 복사 하려고 합니다. )

image

To do so, it seems necessary to read the date from the system, convert it into a function, read the date part from the Excel table, and then compare the two values.

(그러기 위해서, 뭔가 시스템의 날짜를 읽어와서 함수화 하고, 엑셀의 표에서 날짜 부분을 읽어온 후, 두 값을 비교하는 행위가 필요할 것 같은데, )

I can’t find a way. If anyone knows, I would greatly appreciate it if you could let me know.
(방법을 찾지 못하겠습니다. 혹시 아시는분 알려주시면 대단히 감사 하겠습니다. )

Regards.

Sloved.
image

1 Like

Hi @jaeho_hyeon

Check the below zip file.
CheckTodayDate.zip (256.8 KB)

Input:
image

Output:
image

Regards

Hey @vrdabberu

You didn’t change Input in DateTime, In your .xaml you are comparing both values as string!
It can’t give expected output!

Hey @jaeho_hyeon

In Read Range activity, Tick Preserve format option!
Take a Assign activity:

dt_Input = dt_Input.AsEnumerable().Where(Function(x) CDate(DateTime.ParseExact(x("DATE").ToString,{"M/d","MM-dd","MM/dd","dd-MM","dd/MM","d/M"},System.Globalization.CultureInfo.InvariantCulture,DateTimeStyles.None).ToString("MM/dd"))>Now).CopyToDataTable

Note: In Above mentioned LinQ you can also add your input date format in Date format Array

Image for your reference:

Just Surround it with Try catch if there is no data then in catch:

This will definitely help you and get expected output!

Regards,
Ajay Mishra

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.