Hi guys, i cant convert output datetime from input dialog box to select/pick dynamically date on web with different variable strMonthYear for select month, strDateOnly for select date. can you help me?
this is the code
test.zip (6.1 MB)
Hi guys, i cant convert output datetime from input dialog box to select/pick dynamically date on web with different variable strMonthYear for select month, strDateOnly for select date. can you help me?
this is the code
test.zip (6.1 MB)
Hi @hanungrizqi
In you parse expression give the format properly.Try this MM/dd/yyyy . I hope you are getting date only in one format?
cheers
Hi @hanungrizqi
I see only one d …give it dd
02/01/2022 - MM/dd/yyyy
2/1/2022 - M/d/yyyy
02/1/2022 -MM/d/yyyy
depending on how input looks you need to give the format
cheers
@Yoichi Hi Sir, can you help me?
Hi @Anil_G Still error. You can try my code maybe it helps, mate
Hi @hanungrizqi
I see you are using outputtextsql which does not have a date at all. That is the reason it is failing. Use correct variable there in the parseExact assign activity
The date is in this ‘dateJan1’ variable and format is MM/dd/yyyy hh:mm:ss no need of using regex there
cheers
Hi @Anil_G , still error like this
i used (System.Text.RegularExpressions.Regex.Match(dateJan1,“\b\d{2}/\d{2}/\d{4}\b”).Value,“MM/d/yyyy” to remove 00:00:00 then i can pick month and date separately on web
Hi @hanungrizqi
For removing you need not do that…please use this code and it will work
dateJan1.ToString(“MMMM yyyy”)
dateJan1 is already a date so no need to parse again in the first place
cheers
Hi @Anil_G
How about strDateOnly to pick the dates?
Hi @hanungrizqi
I hope this is what you are asking
dateJan1.ToString(“dd”) - this will give single digit like this 01,02,03,…
or
dateJan1.ToString(“d”) - This will give single digit dates like this 1,2,3…
cheers
Hi @Anil_G
when i input week of year = 14 (its mean 03/27/2022 00:00:00) the code program can’t pick the dates dynamically on web
Hi @hanungrizqi
This looks like a total different question can you please close this thread and open a new one for that and also it would be better if you can elaborate your question on the new thread. This would help segregation of questions and also give you best possible answers
cheers
Hi @Anil_G
Okay thanks for your support.