How to convert array value into getbyformat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2024 05:12 PM
I have tried the below code and it's not working with the array. Showing as undefined
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2024 07:13 PM
Hi @Elakkiya A ,
is the format you are asking is correct? " ('EEEE dd MMMM YYYY') "
What is EEEE here?
It should be DD MM YYYY
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2024 07:28 PM - edited 01-22-2024 07:28 PM
Hi @Elakkiya A
there are several issues in your script. You cannot perform method getByFormat() on a string type, but date is of type string in your script. Furthermore getbyFormat is only defined for the GlideDate() API.
Therefore the following script is working fine
For your script you probably have to replace line 5 with (unfortunately you did not explain what rel.begin is)
Maik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2024 07:39 PM
Hi @Maik Skoddow,
I am trying to getDisplayValue of a field which is the Date and time
Here I got the date alone by using that split condition. Now I need that date in this format EEEE dd MMMM YYYY. Is that possible?
Because If you use getValue instead of getDisplayValue for the begin field it's getting the previous date.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2024 05:44 AM
Hi @Elakkiya A
I already provided the solution. You just have to take my code and adopt accordingly. So what is the issue?
Maik