Try the function: (CTXT(arg))

Regards, Alastair

On 29/01/2021 05꞉41, 'R Hopkins' via RBASE-L wrote:

Dan,
  Here is another technique for a converting variable of type time to a vaiable of type text, and it is very simple.

SET VAR  vtime TIME = 10:11:22
SET VAR vtxt TEXT = &vtime       --This works
SET VAR vtxt TEXT = (&vtime)     --This does not works

But to work, you can't put parenthesis around the expression

R Hopkins

-----Original Message-----
From: Dan Goldberg <[email protected]>
To: [email protected] <[email protected]>
Sent: Wed, Jan 13, 2021 7:26 am
Subject: RE: [RBASE-L] - convert text to time data type

Thx guys. I think this gives me an idea!
Dan Goldberg
*From:* [email protected] <[email protected]> *On Behalf Of *Buddy Walker
*Sent:* Wednesday, January 13, 2021 7:13 AM
*To:* [email protected]
*Subject:* RE: [RBASE-L] - convert text to time data type
Dan
  You could create another column newTimeCol and set it to time
  UPDATE table SET newTimeCol = oldTextCol
   This should work as long as each row has AM or PM in it
   You could also just change the column from text to time. This may caused problems with reports/forms etc.
Buddy
*From:* [email protected] <mailto:[email protected]> <[email protected] <mailto:[email protected]>> *On Behalf Of *Dan Goldberg
*Sent:* Wednesday, January 13, 2021 9:58 AM
*To:* '[email protected]' <[email protected] <mailto:[email protected]>>
*Subject:* [RBASE-L] - convert text to time data type
I have a text field that a user selects from for each hour.
8:00 AM
9:00 AM
10:00 AM
….
I need to convert that to a time format so I can use it in calculations. I do not see a function to do so. Anyone know how I can convert it?
TIA
Dan Goldberg
--
For group guidelines, visit http://www.rbase.com/support/usersgroup_guidelines.php <http://www.rbase.com/support/usersgroup_guidelines.php>
---
You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/rbase-l/2E4830CEC16615458329D3D83342F8D0014E7A21FB%40EXCHANGE10 <https://groups.google.com/d/msgid/rbase-l/2E4830CEC16615458329D3D83342F8D0014E7A21FB%40EXCHANGE10?utm_medium=email&utm_source=footer>.
--
For group guidelines, visit http://www.rbase.com/support/usersgroup_guidelines.php <http://www.rbase.com/support/usersgroup_guidelines.php>
---
You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/rbase-l/000d01d6e9be%24865abd40%24931037c0%24%40comcast.net <https://groups.google.com/d/msgid/rbase-l/000d01d6e9be%24865abd40%24931037c0%24%40comcast.net?utm_medium=email&utm_source=footer>.
--
For group guidelines, visit http://www.rbase.com/support/usersgroup_guidelines.php <http://www.rbase.com/support/usersgroup_guidelines.php>
---
You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/rbase-l/2E4830CEC16615458329D3D83342F8D0014E7A22AE%40EXCHANGE10 <https://groups.google.com/d/msgid/rbase-l/2E4830CEC16615458329D3D83342F8D0014E7A22AE%40EXCHANGE10?utm_medium=email&utm_source=footer>.
--
For group guidelines, visit http://www.rbase.com/support/usersgroup_guidelines.php <http://www.rbase.com/support/usersgroup_guidelines.php>
---
You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/rbase-l/1025492020.104991.1611898886306%40mail.yahoo.com <https://groups.google.com/d/msgid/rbase-l/1025492020.104991.1611898886306%40mail.yahoo.com?utm_medium=email&utm_source=footer>.

--
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
--- You received this message because you are subscribed to the Google Groups "RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/DB6PR1001MB09682B8397520904BCA46028ACB99%40DB6PR1001MB0968.EURPRD10.PROD.OUTLOOK.COM.

Reply via email to