string(year(PartTran.TranDate), "9999") + string(month(PartTran.TranDate), "99")
--- In vantage@yahoogroups.com, Keith Walter <keithfwalter@...> wrote:
>
> OK, i now have this all working except for your right-trim function. Not sure
> why it does not like it...
> ÂÂ
> Keith Walter
> Vantage Coordinator
> Norgren Automation Solutions, Saline Division
> keith.walter@...
>
>
>
>
> ________________________________
> From: Vic Drecchio <vic.drecchio@...>
> To: vantage@yahoogroups.com
> Sent: Tue, January 4, 2011 2:37:03 PM
> Subject: RE: [Vantage] Re: BAQ Calculated Field Help - concatonate dates
>
> ÂÂ
> Keith, both functions work independently because they are returning
> numerical values. You want string values to concatenate.
>
> String(Year(PartTran.TranDate)) + Right-Trim('00' +
> String(Month(PartTran.TranDate)),2)
>
> The above should work. I prefix the leading zeros in string format and
> then take the right two characters. This would keep your results clean
> and a predictable YYYYMM format.
>
> ________________________________
>
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
> Of Keith Walter
> Sent: Tuesday, January 04, 2011 2:22 PM
> To: vantage@yahoogroups.com
> Subject: [Vantage] Re: BAQ Calculated Field Help - concatonate dates
>
> Sorry for the resend... I am getting intermittent success posting to
> this group,
> and i really need some help with this.
>
> Thanks,
>
> Keith Walter
> Vantage Coordinator
> Norgren Automation Solutions, Saline Division
> keith.walter@... <mailto:keith.walter%40norgrenauto.com>
>
> ________________________________
> From: Keith Walter <keithfwalter@...
> <mailto:keithfwalter%40ymail.com> >
> To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> Sent: Tue, January 4, 2011 1:56:18 PM
> Subject: BAQ Calculated Field Help - concatonate dates
>
> I need help! I am trying to create a calculated field in a BAQ to
> create some
> custom date strings. For example: I want to take a date field, and use
> it to
> display YEAR AND MONTH, like this:
>
> YYYYMM (e.g. 201101 would be this month)
>
> I have tried this:
>
> year(PartTran.TranDate) + month(PartTran.TranDate)
>
> and this:
>
> year(PartTran.TranDate) & month(PartTran.TranDate)
>
> Both of these functions work independantly, but i cannot figure out how
> to
> concatonate them together in a BAQ!
>
> Any suggestions!?
>
> Keith Walter
> Vantage Coordinator
> Norgren Automation Solutions, Saline Division
> keith.walter@... <mailto:keith.walter%40norgrenauto.com>
>
> [Non-text portions of this message have been removed]
>
> [Non-text portions of this message have been removed]
>
>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>