Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    SQL Server datetime field format

Read-Only Read-Only Topic
Go
Search
Notify
Tools
SQL Server datetime field format
 Login/Join
 
Member
posted
Hi,
I am trying to insert a timestamp into a datetime field on SQL Server using a stored procedure in DataMigrator. Does anybody have an example of how you format a datetime value to pass through? I have attempted this by trying to concatenate &DATE and &TOD, but I keep getting an error saying that this is in the incorrect format.

Thanks!


Prod: Service Manager 5.5 - DataMigrator 7.6 - Win2K
Test: Service Manager 5.5 - DataMigrator 7.6 - Win2K
Local: DevStudio 5.5.3 - Management Console
- Windows XP SP2
 
Posts: 21 | Location: Cape Town, South Africa | Registered: January 15, 2007Report This Post
Platinum Member
posted Hide Post
This works for me in Oracle:

-SET &TOD_H = EDIT(&TOD,'99');
-SET &TOD_M = EDIT(&TOD,'$$$99');
-SET &TOD_S = EDIT(&TOD,'$$$$$$99');
-SET &TOD_HMS = &TOD_H | &TOD_M | &TOD_S;
-SET &TS = &YYMD | &TOD_HMS;
-TYPE TS: &TS

SQL SQLORA
INSERT INTO OWNER.TABLENAME
(DATE_FIELD)
VALUES (TO_TIMESTAMP('&TS.EVAL','YYYYMMDDHH24MISS'))
;
END
-RUN


Data Migrator 5.3, 7.1, 7.6
WebFOCUS 7.1, 7.6, 7.7
SQL Server, Oracle, DB2
Windows
 
Posts: 126 | Registered: January 18, 2007Report This Post
Member
posted Hide Post
Ah - didn't think about splitting it up into individual elements - but good idea Smiler
I'll let you know if I find a one-liner to do this too.

Thanks!


Prod: Service Manager 5.5 - DataMigrator 7.6 - Win2K
Test: Service Manager 5.5 - DataMigrator 7.6 - Win2K
Local: DevStudio 5.5.3 - Management Console
- Windows XP SP2
 
Posts: 21 | Location: Cape Town, South Africa | Registered: January 15, 2007Report This Post
Virtuoso
posted Hide Post
Darren

I was reading this "old" issue and I wondered if this works already, otherwise you might be able to let this done by the SQL proces itself.
I think you can define a default value on the database that automatically insert the datetime to the actual value unless you enter an other value.

good luck




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Member
posted Hide Post
If anybody needs this - I've managed to figure it out.
Darren 1 : iWay 0
Smiler

-*Create the timestamp variable in the correct format for SQL Server to use
-SET &TIME = EDIT(&TOD,'99:$99:$99')||'.000';
-TYPE &TIME

-SET &DAY = EDIT(&YYMD,'9999-99-999');
-SET &TS = &DAY||&TIME;


Prod: Service Manager 5.5 - DataMigrator 7.6 - Win2K
Test: Service Manager 5.5 - DataMigrator 7.6 - Win2K
Local: DevStudio 5.5.3 - Management Console
- Windows XP SP2
 
Posts: 21 | Location: Cape Town, South Africa | Registered: January 15, 2007Report This Post
Member
posted Hide Post
Darren 1: 0 iWay
Smiler

-*Create the timestamp variable in the correct format for
-*SQL Server to use
-SET &TIME = EDIT(&TOD,'99:$99:$99')||'.000';
-TYPE &TIME

-SET &DAY = EDIT(&YYMD,'9999-99-999');
-SET &TS = &DAY||&TIME;


Prod: Service Manager 5.5 - DataMigrator 7.6 - Win2K
Test: Service Manager 5.5 - DataMigrator 7.6 - Win2K
Local: DevStudio 5.5.3 - Management Console
- Windows XP SP2
 
Posts: 21 | Location: Cape Town, South Africa | Registered: January 15, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    SQL Server datetime field format

Copyright © 1996-2020 Information Builders