Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
String Compare Issue For Date
#1
Hi Friends,

I am having trouble with comparing strings.
I have a date picked from excel and I need just the date part.
I would need 2 digits if date is greater than 9 and only 1 digit if less than 10.
Reason: If less than 10 then the date picked from excel would have 0 preceeding the actual date and would create havoc while selecting date on a website.
Below is the code I have been trying to work on:

Macro RO Sales VISTA
Code:
Copy      Help
,ARRAY(str) varDate
,es.CellsToArray(varDate "sel")
,str vDate=varDate
,
,if vDate[0]=0
,,str e5.get(vDate 1 1)
,,out e5
,else
,,e5.left(vDate 2)
,,out e5
Best Regards,
Philip
#2
if vDate[0]='0'
or
if vDate.beg("0")
#3
Thanks Gintaras; That cleared it...
Best Regards,
Philip


Forum Jump:


Users browsing this thread: 1 Guest(s)