1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 <2007> 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 <2007> 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: Accessing Date and Time information |
From: | Ralph Lange <[email protected]> |
To: | Andrew Johnson <[email protected]> |
Cc: | [email protected] |
Date: | Fri, 11 May 2007 21:34:50 +0200 |
Yes, there's a stringin device support delivered as part of Base since R3.14.5 that you can give an strftime string to. Eg:
record(stringin, "$(user)now") { field(DESC, "Current time and date") field(DTYP, "Soft Timestamp") field(INP, "@%Y-%m-%d %H:%M:%S.%03f") }
If you need the fields as integers rather than strings you can use one stringin record per field and rely on the numeric conversions built into the database links to convert the VAL field of each record into the appropriate integer -- not wildly efficient, but functional.