Not sure if you're trying to do something in code or by using formulas, but
take a look at this article, since it might help:
http://enterprise-solutions.swits.net/infopath2003/article.php?t=date-time-basic
s-infopath&c=infopath2003
Extracting the year would be a matter of parsing the date and not calling
"Year(...)" whatever that might be.
---
S.Y.M. Wong-A-Ton
> Hello,
>
[quoted text clipped - 6 lines]
> Thanks for your help,
> Joel
Sorry, Joel. Just realized you might be trying to use the Year function of
VBScript in an XPath expression. If this is the case, that will not work,
since dates in Infopath are not objects, but just text.
If you are using formulas, look into using the substring() function to
extract the year in a date. If you are using code, try the Mid() function of
VBScript.
Let me know how it goes.
---
S.Y.M. Wong-A-Ton
> Hello,
>
[quoted text clipped - 6 lines]
> Thanks for your help,
> Joel
Joel Allen - 26 Oct 2006 18:16 GMT
Thank you! Substring worked perfect.
Joel
> Sorry, Joel. Just realized you might be trying to use the Year function of
> VBScript in an XPath expression. If this is the case, that will not work,
[quoted text clipped - 21 lines]
>> Thanks for your help,
>> Joel
S.Y.M. Wong-A-Ton - 27 Oct 2006 07:56 GMT
You're welcome! Glad you got it working now.
---
S.Y.M. Wong-A-Ton
> Thank you! Substring worked perfect.
>
[quoted text clipped - 25 lines]
> >> Thanks for your help,
> >> Joel