OK - I have a date in an Excel spreadsheet 01/01/04 that I need to copy and paste into another program as 010104. I'm stumbling over the code. I want to copy it to clipboard, convert it and paste.
Ctrl-C yada yada yada
GCB>DATE
Let>NEWDATE=A
Mid>DATE,1,2,MTH
Mid>DATE,4,2,DAY
Mid>DATE,6,2,YER
Concat>MTH,DAY,YER
This doesn't seem to work.
Help! -Wilfred
Date conversion
Moderators: Dorian (MJT support), JRL
Hi,
Concat only accepts two parms. Instead do this:
Ctrl-C yada yada yada
GCB>DATE
Let>NEWDATE=A
Mid>DATE,1,2,MTH
Mid>DATE,4,2,DAY
Mid>DATE,6,2,YER
Let>DATE=%MTH%%DAY%%YER%
DATE is now in the format you want it.
Concat only accepts two parms. Instead do this:
Ctrl-C yada yada yada
GCB>DATE
Let>NEWDATE=A
Mid>DATE,1,2,MTH
Mid>DATE,4,2,DAY
Mid>DATE,6,2,YER
Let>DATE=%MTH%%DAY%%YER%
DATE is now in the format you want it.
MJT Net Support
[email protected]
[email protected]
I tried it and it didn't seem to work. Here is my latest (non-working) version.
GCB>THEDATE
Send>THEDATE ( Just to see if its in windows clipboard)
MidStr>THEDATE,1,2,THEMTH
Send>THEMTH
MidStr>THEDATE,4,2,THEDAY
Send>THEDAY
MidStr>THEDATE,6,2,THEYER
Send>THEYER
MidStr>Date Happy Birthday,1,5,somevalue
Send>somevalue
I end up with:
01/01/04THEMTHTHEDAYTHEYEARDate H
agh!
GCB>THEDATE
Send>THEDATE ( Just to see if its in windows clipboard)
MidStr>THEDATE,1,2,THEMTH
Send>THEMTH
MidStr>THEDATE,4,2,THEDAY
Send>THEDAY
MidStr>THEDATE,6,2,THEYER
Send>THEYER
MidStr>Date Happy Birthday,1,5,somevalue
Send>somevalue
I end up with:
01/01/04THEMTHTHEDAYTHEYEARDate H
agh!
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
I have no time to do real tests right now, but noticed the end of your results ......Date H is the result of your last MidStr> command:
MidStr>Date Happy Birthday,1,5,somevalue
=====================================
A few things come to mind right away that you can do to help yourself.
1. Make sure you do not have any trailing spaces on any lines.
2. When you are Sending on every line you are just appending to the cursor position. Try using MessageModal> vs. Send> to validate the contents real time, or open the Watch List in the editor and Single Step through the lines to see the results. I recommend using the Single Step approach with the Watch List opened up.
MidStr>Date Happy Birthday,1,5,somevalue
=====================================
A few things come to mind right away that you can do to help yourself.
1. Make sure you do not have any trailing spaces on any lines.
2. When you are Sending on every line you are just appending to the cursor position. Try using MessageModal> vs. Send> to validate the contents real time, or open the Watch List in the editor and Single Step through the lines to see the results. I recommend using the Single Step approach with the Watch List opened up.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!