Focal Point
[SOLVED] Converting DATE field to MMYYYY integer to be used in comparison

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/5887035126

June 22, 2012, 08:06 AM
Ted Michalski
[SOLVED] Converting DATE field to MMYYYY integer to be used in comparison
I have a Date field (DD/MM/YYYY) and need to convert it to MMYYYY as an integer (ex. 01/31/2012 to 012012) to be used in a comparison with another MMYYYY date.

This message has been edited. Last edited by: Kathleen Butler,


7.7.02
Windows
EXCEL, PDF, CSV, TEXT
June 22, 2012, 09:18 AM
Danny-SRL
Hi Ted,

  
D1/DMYY='&DMYY';
D2/A8DMYY=D1;
D3/I6L=EDIT(EDIT(D2,'$$999999'));



Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

June 22, 2012, 09:33 AM
Ted Michalski
Thanks, I'll try that.


7.7.02
Windows
EXCEL, PDF, CSV, TEXT
June 22, 2012, 10:41 AM
j.gross
Since you are dealing with a field in a data record (rather than a parameter value), you can use

alpha_date/A8DMYY=EDIT(date_field,'99$99$9999');
relative_date/DMYY=alpha_date;

relative_date displays as a formatted date in the original format (DD/MM/YYYY), but it can be used to sort records into date order. (Its internal value is the offset, in days, from some standard base date.)