PLM 360 General

Reply
Mentor
Posts: 185
Registered: ‎10-04-2012
Message 1 of 3 (158 Views)
Accepted Solution

Computed Field Syntax

158 Views, 2 Replies
11-28-2013 04:53 AM

Hi,

 

I previosuly used SQLT on computed fields. This now longer appears to work. I believe the new syntax is PosdtgreSQL. Can you tell me how I can extract the week from a date in a computed field? Also how can I display today's date. I can displat the timestanp using 'now()' but I can't figure out how to extract just the date portion.

 

Thanks for you help,

 

David.

Product Support
Andrew.Shaw
Posts: 44
Registered: ‎01-09-2012
Message 2 of 3 (146 Views)

Re: Computed Field Syntax

11-28-2013 07:14 AM in reply to: dkeeley

Hello David,

 

You can extract the day as a string by using the following formula: to_char(FIELD_NAME,'dd').

 

However, if the target data type is numerical, use the following formula: to_number(to_char(FIELD_NAME,'dd'),'99').

 

Best regards,



Andrew Shaw
Premium Support Specialist PLM/PDM
Global Services
Autodesk, Inc.

Mentor
Posts: 185
Registered: ‎10-04-2012
Message 3 of 3 (140 Views)

Re: Computed Field Syntax

11-28-2013 08:22 AM in reply to: Andrew.Shaw

Thanks Andrew! Perfect.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Welcome to the new Autodesk Community!
If this is your first visit, click here to get started and make the most of the Community. Let us know what you think of the new experience in the Community Feedback Forum.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community