03-18-2010 08:52 AM - edited 03-14-2019 05:27 AM
Hi,
I've this condition: If (date.after(D[19 de marzo de 2010 00:00:00]) && date.before(D[7 de mayo de 2010 00:00:00]) ) Then.
But i want ask without the year and time, how can i do?
Thanks!!
Emilio
03-18-2010 09:40 AM
Take a look at the UCCX Scripting and Development Series: Volume 3, Expression Language Reference Guide
There is a section on Date literals, and it shows you the valid formats.
I have quoted a portion of the document here for quick review:
Example Date Literals:
D[12/13/52]
D[Dec 13, 1952]
D[Thu, July 4, 2002]
D[July 5, 2002]
D[July 7, 2002]
D[7/6/02]
D[Thu, July 4, 2002 5:59 PM]
D[July 5, 2002 5:59 PM]
D[July 7, 2002 5:59 PM]
D[7/6/02 5:59 PM]
D[Thu, July 4, 2002 12:23:59 AM]
D[July 5, 2002 12:23:59 AM]
D[July 7, 2002 12:23:59 AM]
D[7/6/02 12:23:59 AM]
D[Thu, July 4, 2002 12:23:59 AM CST]
D[July 5, 2002 12:23:59 AM CST]
D[July 7, 2002 12:23:59 AM CST]
D[7/6/02 12:23:59 AM CST]
D[now]
03-18-2010 09:54 AM
Thanks Anthony!!!
03-22-2010 01:31 AM
Hi Anthony,
But i don't want control the year, i only want control day and month, how can i do?
Thanks!
Emilio
03-22-2010 08:14 AM
Oh I see, so you were not asking what the valid formats are, you were asking how to compare two dates, without considering the year and time?
You can compare parts of the date like this:
if (d[now].month >= d[February 1, 2010].month)
/* The current month is, or is after February */
} else {
/* The current month is before February */
}
And dates are accessed like this:
d[now].date
Message was edited by: Anthony Holloway - Typo on February...corrected now.
03-22-2010 09:20 AM
Hi,
I'm trying to write this:
date.month >= date[Febraury 1, 2010].month
but send me an error when i click in Apply... i use variable date, where date = D[now]
The error is "Unable to parse expression; Couldn't repair and continue parsing on token #INTEGER "1" (line: 1, col:30)" and refer with the day
Regards,
03-22-2010 09:53 AM
it's d[] not date[]. =)
03-23-2010 01:36 AM
Hi,
With d[now] neither work, i've the error "Unparseable date: "Febraury 1, 2010"
What version have you got? i've 5.0
Thanks!
Regards,
Emilio
03-23-2010 01:58 AM
Hi ,
What exactly are you writing?
It should look like D[now].date or D[now].month
Ervins
03-23-2010 03:14 AM
Hi,
I'm writing exactly that Anthony told me:
d[now].month >= d[Febraury 1, 2010].month
Emilio
03-23-2010 08:12 AM
I spelled February wrong, and you copied my mistake. sorry.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: