BAQ Calculated Field Help - concatonate dates

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]
>
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@...




[Non-text portions of this message have been removed]
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@...




________________________________
From: Keith Walter <keithfwalter@...>
To: vantage@yahoogroups.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@...





[Non-text portions of this message have been removed]
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]
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]
I used an IF function instead to good success:
String(Year(PartTran.TranDate)) +
If Length(String(Month(PartTran.TranDate))) = 2
Then String(Month(PartTran.TranDate))
Else '0' + String(Month(PartTran.TranDate))
Â

Â
Keith Walter
Vantage Coordinator
Norgren Automation Solutions, Saline Division
keith.walter@...




________________________________
From: Keith Walter <keithfwalter@...>
To: vantage@yahoogroups.com
Sent: Tue, January 4, 2011 3:00:25 PM
Subject: Re: [Vantage] Re: BAQ Calculated Field Help - concatonate dates

Â
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]


Â




[Non-text portions of this message have been removed]
Good Day Keith:

This is not my strong area, but:

1. One too many Parenthesis- delete red, Is that a zero or a letter
o.
String(Year(PartTran.TranDate))+
If Length(String(Month(PartTran.TranDate))) = 2
Then String(Month(PartTran.TranDate))
Else '0' + String(Month(PartTran.TranDate))

2. If you are in SQL, the TRIM command may be substring : delete
'right' add substring ,

String(Year(PartTran.TranDate)) + Right- Substring('00' +
String(Month(PartTran.TranDate)),3,2)

format is Substring ([field],[start- position],[number of
characters])




len.hartka@...
Sun went live on 11/29
in Epicor 9, 9.05.601B SQL-Unidata
Sun was previously on M2K (Manage-2000) 7.0 SP 5 (Informix)




________________________________

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Keith Walter
Sent: Tuesday, January 04, 2011 3:33 PM
To: vantage@yahoogroups.com
Subject: Re: [Vantage] Re: BAQ Calculated Field Help - concatonate dates




I used an IF function instead to good success:
String(Year(PartTran.TranDate)) +
If Length(String(Month(PartTran.TranDate))) = 2
Then String(Month(PartTran.TranDate))
Else '0' + String(Month(PartTran.TranDate))



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 3:00:25 PM
Subject: Re: [Vantage] Re: BAQ Calculated Field Help - concatonate dates


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@... <mailto:keith.walter%40norgrenauto.com>

________________________________
From: Vic Drecchio <vic.drecchio@...
<mailto:vic.drecchio%40timco.aero> >
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.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%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On
Behalf
Of Keith Walter
Sent: Tuesday, January 04, 2011 2:22 PM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.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>
<mailto:keith.walter%40norgrenauto.com>

________________________________
From: Keith Walter <keithfwalter@...
<mailto:keithfwalter%40ymail.com>
<mailto:keithfwalter%40ymail.com> >
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.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>
<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]



[Non-text portions of this message have been removed]






This e-mail and any attachments may contain proprietary and/or confidential information. If you are not the intended recipient, please notify the sender immediately by reply e-mail or at 410-472-2900 and then delete the message without using, disseminating, or copying this message or any portion thereof. With e-mail communications you are urged to protect against viruses.


[Non-text portions of this message have been removed]